DeepMenusPlugin
Extends RadialUI Plugin to allow any level of sub-menus.
About this mod Author’s original text
Deep Menus Plugin
This unofficial TaleSpire plugin that ends Radial UI Plugin allowing sub-menus beyond one level.
This plugin, like all others, is free but if you want to donate, use:
Change Log
1.0.0: Initial release
Install
Use R2ModMan or similar installer to install this plugin.
Usage
This is a dependency plugin so there is no user usage. Developers can integrate the functionality of this plugin
into their own plugins using the below information.
The plugin has 3 levels of hand holding ranging from taking care of most of the functionality for the user to
handling only the essential functionality and letting the user handle the details him/herself.
Simplest Solultion
- Create the top level menu using the usual RadialUI plugin code, such as:
`RadialUI.RadialSubmenu.EnsureMainMenuItem(Guid, RadialUI.RadialSubmenu.MenuType.character, "Create", FileAccessPlugin.Image.LoadSprite("option.png"));`
- Add submenu entries using the provided `CreateSubMenu and MakeSubMenuEntry` functions.
CreateSubMenu("", MakeSubMenuEntry("Male", icon));
CreateSubMenu("", MakeSubMenuEntry("Female", icon));
or if you want to add a checker:
CreateSubMenu("", MakeSubMenuEntry("Male", icon), () => { return DateTime.UtcNow.ToString("s").Contains("5"); } );
CreateSubMenu("", MakeSubMenuEntry("Female", icon), () => { return!DateTime.UtcNow.ToString("s").Contains("5"); } );
- Add menu ietms using the provided `CreateSubMenuItem and MakeItemEntry` functions.
CreateSubMenuItem("/Male/Male Artificer", MakeItemEntry("Good", (s,m) => SystemMessage.DisplayInfoText(s+" in "+m), icon));
CreateSubMenuItem("/Male/Male Artificer", MakeItemEntry("Evil", (s,m) => SystemMessage.DisplayInfoText(s+" in "+m), icon));
or
CreateSubMenuItem("/Male/Male Artificer", MakeItemEntry("Good", (s,m) => SystemMessage.DisplayInfoText(s+" in "+m), icon),() => { return DateTime.UtcNow.ToString("s").Contains("5"); } );
CreateSubMenuItem("/Male/Male Artificer", MakeItemEntry("Evil", (s,m) => SystemMessage.DisplayInfoText(s+" in "+m), icon),() => { return!DateTime.UtcNow.ToString("s").Contains("5"); });
The `MakeSubMenuEntry and MakeItemEntry create the necessary RadialUI MapMenu.ItemArgs and the CreateSubMenuItem and CreateSubMenuItem` automatically setup the Submenu objects
as well as the NagivateTo action for submenu entries so the user does not need to set the Action property for submenu entries. The results are then passed to the RadialUI `CreateSubMenuItem`
function which handles the rest of the process.
This usage is the easiest to use but it also does not provide access to all of the RadialUI `MapMenu.ItemArgs properties like fadeName`.
Assisted Solution
- Create the top level menu using the usual RadialUI plugin code, such as:
`RadialUI.RadialSubmenu.EnsureMainMenuItem(Guid, RadialUI.RadialSubmenu.MenuType.character, "Create", FileAccessPlugin.Image.LoadSprite("option.png"));`
- Add submenu entries using the provided `CreateSubMenu` function.
CreateSubMenu("", new MapMenu.ItemArgs() { Title = "Male", Icon = icon, FadeName = false, CloseMenuOnActivate = true });
CreateSubMenu("", new MapMenu.ItemArgs() { Title = "Female", Icon = icon, FadeName = false, CloseMenuOnActivate = true });
or if you want to add a checker:
CreateSubMenu("", new MapMenu.ItemArgs() { Title = "Male", Icon = icon, FadeName = false, CloseMenuOnActivate = true }, () => { return DateTime.UtcNow.ToString("s").Contains("5"); });
CreateSubMenu("", new MapMenu.ItemArgs() { Title = "Female", Icon = icon, FadeName = false, CloseMenuOnActivate = true }, () => { return!DateTime.UtcNow.ToString("s").Contains("5"); });
- Add menu ietms using the provided `CreateSubMenuItem` function.
CreateSubMenuItem("/Male/Male Artificer", new MapMenu.ItemArgs() { Title = "Good", Action = (mmi, s) => SystemMessage.DisplayInfoText("Good from "+currentMenu), Icon = icon, FadeName = false, CloseMenuOnActivate = true });
CreateSubMenuItem("/Male/Male Artificer"
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: