Home Creators Posts Import Register Favorites Logout

Content

This is the first version that supports user-created menus.

An example menu.ini file was supplied in the ID1 dir, containing a few submenus and calls to some menus from the old menu system. To use it, enter this command line either in the console, or in the autoexec.ini file, or in the default.ini file:

exec menu.ini

Obs: the menu.ini file will be automatically loaded in the next versions.

Afterwards, you can enter "menu main" in the console (or bind it to a key) to open the Main menu defined in menu.ini.

The syntax for the commands in menu.ini are subject to change, but so far here are some remarks:

The indentation I've used in the menu.ini file is not mandatory, it only serves to make the command hierarchy easier to understand.

menu_add_hint will add a "hint" box to the menu item immediately above. Hint boxes are the information boxes displayed at the bottom of the screen when the cursor is positioned on certain items.

menu_create automatically creates a label at the beginning of the menu, but you can customize that first label by entering the menu_add_label command immediately afterwards. If you don't want to display a label at the top of the list, enter menu_add_label ""(empty text) after menu_create.

menu_add_command can either input commands directly, or use a pop-up menu to ask for confirmation first. If you don't include a question on its third parameter, the command will be input silently — no questions asked.

The text fields doesn't support escape sequences. This means you can't manually define where new lines will be placed, and have to rely on the word-wrapping algorithm for things like hints and pop-up questions. This may change in the future.

The top image and the side image of menus should always be placed on the gfx folder, and their path & filename extension in menu_create are optional. This means you can type either qplaque or gfx/qplaque.lmp, for example.

Not all parameters of menu_create were implemented yet. In the supplied menu.ini file, the only parameter among small colorized 19 no that's implemented is the item width (19).

The first parameter of menu_create can include multiple words inside quotes, and in this case the quotes will also be required by the menu_add_menu and menu commands when creating a menu item to open them, or opening them directly. E.g. menu_create "My first menu" [...] implies in menu_add_menu "My first menu" and in menu "My first menu".

The numbers in menu_add_slider are the parameters for minimum value, maximum value, and amount of steps. The size of each step is computed automatically from max - min / amount, so you have to do the math if you want the steps to have a specific size — see the scr_2d_scale slider for an example, its amount of steps was calculated for each step to have 0.0625 in size. This approach was chosen because it's more accurate to compute the size from the amount, than the amount from the size (see con_alpha — the required step size value has an infinite decimal expansion).

There's still a lot of menu functionality to be implemented, as I'm aiming to fully replace the old menu system. But I'm carefully going to keep the menu.ini syntax as lean as possible.

Also, the exclusive quit messages from the Saturn version of Quake were added to the list of quit messages, giving it a little more variety.

This version was also compiled with Core2 Duo compiler optimizations, to try to make it more compatible than the previous versions that used Core i7 compiler optimizations. I haven't benchmarked it yet to see if there's any speed difference.

Files

Comments

No comments found for this post.