DeepMenusPlugin
Extends RadialUI Plugin to allow any level of sub-menus.
模組介紹 作者原文
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"
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: