C_MENU Daedalus class
Acknowledgment
Heavily inspired by the amazing documentation site Gothic library
Class C_Menu
is responsible for the behavior and properties of the game menus (options, save etc.).
Class definition
Class definition as it is defined in Scripts/System/_intern/Menu.d
script file.
C_Menu Daedalus class
Class members
Variable | Type | Description |
---|---|---|
backPic | string | Menu background image |
backWorld | string | Background ZEN-world of the game menu (Not used) |
posx | int | The top left point of the menu on the screen horizontally (X-axis) |
posy | int | The top left point of the menu on the screen vertically (Y-axis) |
dimx | int | Menu width in virtual coordinates |
dimy | int | Menu height in virtual coordinates |
alpha | int | Menu transparency |
musicTheme | string | Music track of the menu |
eventTimerMSec | int | The timer that triggered the event in seconds |
items | string | Menu items |
flags | int | Menu flags |
defaultOutGame | int | Menu item highlighted by default when the game is not running |
defaultInGame | int | Menu item highlighted by default when the game is running |
Class member overview
Description of the class member variables.
backPic
backPic
is just a name of background image of the menu in .tga
format.
backWorld
Deprecated setting
The background world of the game menu in .ZEN
format.
posx
The horizontal position of the top left point of the menu on the screen, in virtual coordinates.
posy
The vertical position of the top left point of the menu on the screen, in virtual coordinates.
dimx
Menu width in virtual coordinates.
dimy
Menu height in virtual coordinates.
alpha
Menu transparency. Accepts values from 0 to 255. Without the backPic
property specified, the value of this parameter is ignored.
Note
Texture transparency can only be adjusted if the texture has an alpha channel.
musicTheme
Music theme of the menu.
All instances of musical themes are stored in a fileScripts/System/Music/MusicInst.d
eventTimerMSec
Defines the trigger time for the event EVENT_TIMER
in seconds.
The list of constants for all menu events is described in the file Scripts/System/_intern/Menu.d
items
An array of items belonging to this menu. It is possible to use up to 150 items in one menu. The same elements can be used for different menus. The element instance is specified as the value.
flags
Menu flags.
The list of flag constants can be found in the file Scripts/System/_intern/Menu.d
- MENU_OVERTOP - Flag to display the menu over the previous menu. It is not advisable to use with a transparent menu.
- MENU_EXCLUSIVE - Hide all menus except the active one. When closed, the previous menu is restored.
- MENU_NOANI - Animation of minimizing and maximizing windows. The game is mainly used for dialogue windows. You can't enable or disable the animation of dialog windows through scripts. This is done using the
animatedWindows
setting in the Gothic.ini file. - MENU_DONTSCALE_DIM - Scale the menu to fit 640x480 resolution.
- MENU_DONTSCALE_POS - Empty flag. Not used.
- MENU_ALIGN_CENTER - Align the menu to the center of the screen.
- MENU_SHOW_INFO - Display information at the bottom of menu description from menu item
text[1]
.
defaultOutGame
The menu item that is highlighted by default when the game is not running.
A value of -1 enables automatic selection of the first selectable element.
Items with the ~IT_SELECTABLE
flag are not selected.
defaultInGame
Menu item highlighted by default when the game is running.
A value of -1 enables automatic selection of the first selectable element.
Items with the ~IT_SELECTABLE
flag are not selected.