Skip to content
DDAkebono edited this page Dec 24, 2022 · 3 revisions

BTKUILib is designed to be pretty easy to get started with, simply create a root page and start going from there. You can create objects at any time (as long as it's within main thread), even before the UI is ready, BTKUILib will handle setting things up once the UI is ready for it, as well as when the menu is reloaded.

This is an example of simple root page creation as well as setting the menu title and subtitle

var ourRoot = new Page("OurMod", "MainPage", true, "OurModIcon");
ourRoot.MenuTitle = "Our Cool Mod";
ourRoot.MenuSubtitle = "This is a cool subtitle!";

Once we've done that we'll have ourselves a nice empty page to work with, from there you can use the functions with Page to create a category or a slider, a category is needed for most of the rest of the components.

var ourCategory = ourRoot.AddCategory("Our Cool Category");

Now that we have our category we can go wild with whatever elements we want in it, let's add a few elements!

var coolButton = ourCategory.AddButton("Neat Button", "CoolIcon", "Hey look it's a cool neat button!");
var funnyToggle = ourCategory.AddToggle("Funny Toggle", "This is a funny toggle that toggles things!", false);
var subPage = ourCategory.AddPage("Nice Subpage", "SubpageIcon", "This subpage does subpage things!", "OurMod");

Clone this wiki locally