Access Menu Objects
These Ikarus functions are intended to provide and simplify access to menu items (e.g. in the character menu).
Tip
Some menus are generated every time they are used, while others are generated once and then kept. For example, a character menu is only available after it was opened for the first time, after that it is kept in memory. Depending on what you actually want to do, it can make sense to introduce changes in the menu scripts.
Initialization
The best way to initialize all Ikarus functions is to call MEM_InitAll()
in the Init_Global()
initialization function.
Warning
If you want to use Ikarus in Gothic 1, it is best to define your own Init_Global()
function and call it from every world initialization function.
Implementation
Functions
MEM_GetMenuByString
MEM_GetMenuByString
Parameters
var string menuName
Name of the Gothic menu e.g.MENU_STATUS
Return value
The function returns the address of the menu if a menu with this name exists, null otherwise.
MEM_GetMenuItemByString
MEM_GetMenuItemByString
Parameters
var string menuItemName
Name of the Gothic menu item e.g.MENU_ITEM_PLAYERGUILD_TITLE
Return value
The function returns the address of the menu item if a menu item with this name exists, null otherwise.