GUIMenuPlugin
Add text/icon menus that appear in centre of screen or slide out the right side. Support for multi-layer hierarchy.
About this mod Author’s original text
GUI Menu Plugin
This unofficial TaleSpire plugin allows the user to text and icon menus similar to the radial menu but in the centre
of the screen or as a side out from the right side of the screen. The GUI Menu plugin allows any number of menu with
links between any menus so you can construct anything from simple hierarchies to complex hierarchies.
Change Log
1.2.0: Added support for different sized icons and offsets
1.0.0: Initial release
Install
Use R2ModMan or similar installer to install this plugin.
Usage (User)
This plugin does not offer any direct functionality. Typically this will be installed as a dependency for some other plugin.
As such there is no user usage beyond that of what the parent plugin may provide.
Usage (Developer)
The GUI Menu Plugin uses a three tier hierarchy to create the menus: GuiMenu, MenuNode, two implementations of IMenuItem
which are MenuLink and MenuSelection.
A GuiMenu holds the entire hierarchy for the menu. For example, if the main menu had two selections for two sub-menus then
the GuiMenu object would hold all 3 Nodes (menus) - the main one and the two sub-menus.
A MenuNode holds all of the options for one particular menu. In the case of the example with two sub menus, there would be
three MenuNodes - one for the main menu and one for each of the two sub-menus. MenuNodes hold IMenuItems are which there
are two types: MenuLink and MenuSelection. They also hold additional internal information about the Node like the state.
IMenuItem is an interface for creating items that a menu (MenuNode) can contain. Currently there are two implementations of
the IMenuIntem interface: MenuLink and MenuSelection. Most of the properties for these items are the same such as title,
text color, texture, and gmOnly. However, each gave an addition property and perform a different task.
MenuLink has a link property. This property contains the name of a MenuNode and causes the current menu to be closed and
the specified menu to be opened. Normally used to navigate from one menu to another such as from a parent menu to a child
menu or from a child to a parent menu. However, the link feature is geenric so links can be made to any other MenuNode
meaning that complex menus can jump from any menu to any other menu.
MenuSelection has a selection property. This property is contains the value that is sent to the callback when the item is
selected.
While the GUI Menu Plugin does support a number of different ways to create the hierarchy of the GUI Menu, one of the
simplest methods is show below:
GUIMenuPlugin.GuiMenu menu = new GUIMenuPlugin.GuiMenu(new GUIMenuPlugin.MenuNode
{
new GUIMenuPlugin.MenuNode("Root", new GUIMenuPlugin.IMenuItem
{
new GUIMenuPlugin.MenuLink("Menu1","Menu1",UnityEngine.Color.red,FileAccessPlugin.Image.LoadTexture("Menu1.png"),false),
new GUIMenuPlugin.MenuLink("Menu2","Menu2",UnityEngine.Color.red,FileAccessPlugin.Image.LoadTexture("Menu2.png"),false)
}, GUIMenuPlugin.MenuStyle.centre),
new GUIMenuPlugin.MenuNode("Menu1", new GUIMenuPlugin.IMenuItem
{
new GUIMenuPlugin.MenuLink("Root","Back",UnityEngine.Color.red,FileAccessPlugin.Image.LoadTexture("Back.png"),false),
new GUIMenuPlugin.MenuSelection("Item1","Item1",UnityEngine.Color.red,FileAccessPlugin.Image.LoadTexture("Item1.png"),false),
new GUIMenuPlugin.MenuSelection("Item2","Item2",UnityEngine.Color.red,FileAccessPlugin.Image.LoadTexture("Item2.png"),false)
}, GUIMenuPlugin.MenuStyle.centre),
new GUIMenuPlugin.MenuNode("Menu2", new GUIMenuPlugin.IMenuItem
{
new GUIMenuPlugin.MenuLink("Root","Back",UnityEngine.Color.red,FileAccessPlugin.Image.LoadTexture("Back.png"),false),
new GUIMenuPlugin.MenuSelection("Item3","Item3",UnityEngine.Color.red,FileAccessPlugin.Image.LoadTexture("Item3.png"),false),
new GUIMenuPlugin.MenuSelection("Item4","Item4",UnityEngine.Color.red,FileAccessPlugin.Image.LoadTexture("Item4.png"),false)
}, GUIMenuPlugin.MenuStyle.centre)
});
You can change the icon size and offset with
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: