-
Notifications
You must be signed in to change notification settings - Fork 21
Multi Level Pie Menu Proposal
CC's controls are rather limited, keyboard shortcuts can't reliably support the various control schemes and multiple players and the pie menu can get very crowded very quickly. One good way to fix this is to allow multiple levels in the pie menu, as shown in the picture below:
My suggestion for how this would work is as follows:
-
Any pie menu option can have either an action when selected (as normal) or open a sub-menu. Sub-menus would display as partial pie menus, as shown above.
-
Pie menu options with a sub-menu would have a visual indicator (shown aboveas a yellow arrow on the expanded option).
-
While there would need to be a limit to the number of options in a sub-menu for it to visually work, there need not be a limit on the number of layers of sub-menus, so modders could have as many levels of sub-menus as they want. For base game content I recommend this stay with only 2 or 3 levels of sub-menus for ease of use.
-
In terms of controls, pie menu options that perform actions would work as normal (move towards and release pie menu button once an option is selected). For pie menu options that open a sub-menu, selecting the option and holding that selection for a short amount of time (probably around half a second) would open up the sub-menu with its options.
-
When a player is in a sub-menu, they should be able to move the cursor in the relative back direction so they can go back to the parent option's menu. I.e, in the picture above, moving the cursor towards the bottom right would close the open sub-menu, allowing them to select another option in the main pie menu. Essentially, this should be intuitive.
-
When a sub-menu is open, its parent option's description will have to display next to the sub-menu's options. When an option in that sub-menu is selected, either the parent option's description will disappear and only the sub-menu's selected option's description will be visible, or they will both be visible in some way that makes it clear which one is the parent option and which is the sub-menu option.
-
It is likely that the pie menu will need to be made slightly wider in order to support adding markers for options that have a sub-menu.
-
I also suggest that some of the current pie menu options be consolidated into one option with a sub-menu, e.g. the various AI modes could be consolidated into one AI mode button that opens a sub-menu with the various modes. Squad management could be enhanced with further actions and put into an option that opens a sub-menu, etc.
Technical Stuff Below
- As mentioned above, modders should be able to freely create sub-menus. Like normal pie slices, these will need to be defined in ini, probably with a section like:
//This would define a sub-menu with its various slices
AddPieSubMenu = SubMenu
MenuName = My Unique Sub-Menu //This would only be used internally for identification
AddPieSlice = Slice
Description = Sub-Menu Option 1
Icon = Icon
CopyOf = Some Icon
ScriptPath = MyMod.rte/Scripts/PieMenus.lua
FunctionName = MySubMenuOption1Function
AddPieSlice = Slice
Description = Sub-Menu Option 2
Icon = Icon
...
ScriptPath = MyMod.rte/Scripts/PieMenus.lua
FunctionName = MySubMenuOption2Function
//This would define a pie slice that opens a sub-menu. Note that unlike normal pie slices it has no script or function references, instead pointing to a menu defined in ini
AddPieSlice = Slice
Description = Sub-Menu Opening Slice
Direction = 1
Icon = Icon
CopyOf = Some Icon
SubMenu = SubMenu
CopyOf = My Unique Sub-Menu //It may not be possible to do a copy, in which case the slice will have to define its sub-menu
Like normal pie slices, once defined in ini they should be editable with lua. The easiest solution to this is probably to add versions of the pie menu modifying functions (i.e. add slice, alter slice and remove slice) that allow you to pass in a sub-menu name and will thus only modify that sub-menu. It will also be necessary to revise or remove access to the GameActivity.PieMenuSlices collection.