Home Artists Posts Import Register
Join the new SimpleX Chat Group!

Content

I'm designing and implementing a generalized menu architecture, with all features implemented through abstract code.

Menus will be able to be created on the fly through a linked list of menu instances; this will allow for user-created menus. However, to prevent user-created menus from entering an infinite loop through circular references between each other, the menus themselves won't be part of the list; they will be just referenced by it.

So, if you open the menus in the order menu1, menu2, menu3, menu2, they will be closed in the order menu2, menu3, menu2, menu1. That is, each instance of menu2 will have different backward and forward links, as well as different cursor positions and scroll offsets, but everything else will be the same (i.e. the values of all menu items will always be the same accross all instances of the same menu).

The linked list nature will also allow for multiple menus to overlay each other. Until now, the only menu that could overlay other menus was the Quit menu. Overlay menus should simplify the implementation of features such as the text reader and the on-screen keyboard.

The menu items are also being implemented through lists in a similar way. This means that it will be possible to have the same menu item appearing in multiple menus (for example, to create multiple variants of the same menus — "common options", "all options", etc). It will also be a lot easier to delete, add and reorder menu items, as well as moving menu items from a menu to another.

To make the menu architecture easier to generalize and maintain, all menus will consist of a single vertical list of items. However, other layouts will be possible by overlaying multiple menus.

So far, the only types of menu items implemented are toggles and sliders. I'm going to finish the new menu system as a whole before implementing other item types.

Right now I'm finishing the implementation of the first test menu using this new menu architecture. Afterwards, I'll start porting all engine menus to it.

Once the new menu sytem fully replaces the old one, I'll start implementing HD texture support in the menus.

I have a lot of ideas for visual effects in the menus, but they're low priority for now. Making the new menu system be mouse driven is more important. Most visual effects I want to implement will require significant changes in the new 2D renderer, including bugfixes and an animation system to handle the 2D rendering parameters.

Comments

No comments found for this post.