Standard Menu UI

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Overview[edit | edit source]

Various mods are now presenting menus for a number of things. It would be useful if such menus were fairly consistent between different mods.

Inventory Item Tokens/Triggers[edit | edit source]

A standard thing to do for triggering menus/actions is to define an inventory item, which triggers when equipped. Suggestions:

  • Make item as misc. item. The equip script block will run even though the item won't actually equip.
    • The "Can't equip" message is annoying, but can be overridden. (Bashed Patch can override this: Tweak Settings: Msg: Equip Misc. Item. Right click on that to select what message you want (None, "." or "Hmm...").)
    • User might hot key the item. You may want to keep this possibility in mind, or you may just want to tell the user "Don't do that." (Problem is that hot keying means that it will be triggered while player is NOT in menuMode, thus any "menuMode" scripts won't run.)
  • Make item a quest item. These can still be equipped, but won't be lost by a "remove all", etc.
  • Standard: Preface item name with "+". This makes all such triggers group together at the top of the misc. item section and makes it clear that they're not regular items.
Examples
  • This screenshot shows several such tokens. They are (in order): Cobl options menu, Cobl dinner plate, Wrye Leveling levelup trigger, PDs "See you sleep." sleepwear trigger, OOO's drop lit torches trigger. For the latter two items, I've tweaked the names to fit the standard. BTW, repair hammers would also be renamed to +Repair Hammer to fit this scheme.

Option Menus[edit | edit source]

For options menus, i.e. for things that the player not the player character configures, I suggest using Cobl's standard config menu. The major advantage of using Cobl's config menu is that it puts all of the options in a place that is easy to reach, but isn't in the players face and which doesn't clutter the users interface. Hence the user can easily perform the config, but isn't constantly tempted to overuse the config. Cobl options also provides shared configs (e.g. the config items for Quest Arrows).

Examples
  • This screenshot shows the Cobl config menu (this is what you get after selecting +[Options] in the inventory -- you can see the inventory window in the background). Main note here is that there are a moderate number of options -- this would be a lot to stuff in the inventory itself, much less scatter across various obscure notes, config rings, misc. items, activators in the world, etc. Here, they're all in one consistent, easy to reach place.

Menu Terminators[edit | edit source]

It's useful to exit terms for menus. I suggest:

  • To exit a menu neutrally, end the menu with "Done".
  • To exit a menu while canceling an incipient action, end the menu with "Cancel".
  • To exit a menu and return to a menu further up in the hierarchy, end the menu with "< Back". (Note leading "< ").
Examples

Hierarchical Menus[edit | edit source]

For hierarchical menus, I suggest:

  • A button that will enter a submenu should end with " >".
  • Submenus should only have one option which will return to the previous menu. That should be the last option in the menu and it should be named "< Back".
  • Submenus should always return to the top menu. I.e. don't allow the user to exit directly from the submenu. This just keeps the menus system simple and consistent.

Examples

Numeric Config Buttons[edit | edit source]

Often it's necessary to configure a number. In vanilla, this leads to fairly ugly menus with buttons for each number. But with OBSE 14 you can use MessageBoxEx and getKeyPress to avoid such menus. What you do is use %g or %f to represent the number. Then a click on the button means increment the button up, while a shift-click means increment the number down.

Examples
  • Wrye Leveling Config Submenu - Buttons show the current number. Clicking/shift-clicking mods that number up/down.
  • Wrye Leveling Submenu - This is to config increments to players stats. First number is the current stat. Second number is the increment -- this is the number that goes up/down with each click/shift-click.
  • Wrye Leveling Config Menu Code - Demonstrates an efficient coding approach to such menus.

Check/Uncheck Buttons[edit | edit source]

Often it's useful to config something as off/on, enabled/disabled, etc. For this a standardized check mark system is useful. Again OBSE 14's MesssageBoxEx is required for this.

  • Designate off by a leading "- ".
  • Designate on by a leading "+ ".
  • Designate no applicable by a leading "o ".

The checkmark symbols are actually faction ranks. Factions are: 0: -; 1: +, 2: o. You can define these factions yourself or if using Cobl, use Cobl's predefined cobStrChecked or cobStrUnchecked factions. (Unchecked is the same as checked, but with the order of the first two ranks inverted -- useful for when your binary variable indicates a negative (e.g. your variable is something like be bDontMorphGold).

Examples

Multistate Option Buttons[edit | edit source]

I haven't done this yet, but the preceding two standards could be combined for some variable which has several states which are internally stored as numbers, but which are represented as strings. E.g. you could have a faction with ranks: Alpha, Beta, Gamma, Delta. Then the button reads "State: Alpha". Clicking the button increments it Beta, then to Gamma, Delta, and then (maybe) back to Alpha.