UIMenuBar Class
The ingame menu bar which sits (nominally hidden) at the top of the screen.
Method Index
- addBevelPanel(x, y, w, h, colour, highlight_colour, shadow_colour, disabled_colour, lowered_colour, apply_ui_scale) (inherited from Window)
- addColourPanel(x, y, w, h, r, g, b, apply_ui_scale) (inherited from Window)
- addKeyHandler(key, handler, ...) (inherited from Window)
- addMenu(title, menu)
- addPanel(sprite_index, x, y, w, h, apply_ui_scale, draw_flags) (inherited from Window)
- addWindow(window) (inherited from Window)
- afterLoad(old, new) (inherited from Window)
- appear()
- beginDrag(x, y) (inherited from Window)
- bringToTop() (inherited from Window)
- calculateMenuSize(menu)
- close() (inherited from Window)
- disappear()
- draw(canvas) (overrides Window:draw)
- drawMenu(menu, canvas)
- getRealXY() (inherited from Window)
- getSavedWindowPositionName() (inherited from Window)
- getTooltipAt(x, y) (inherited from Window)
- getTooltipForElement(elem, x, y) (inherited from Window)
- getWindow(window_class) (inherited from Window)
- getWindows(window_class) (inherited from Window)
- hitTest(x, y) (inherited from Window)
- hitTestBar(x, y)
- hitTestPanel(x, y, panel) (inherited from Window)
- hoverTest(active_hover, mouse_x, mouse_y, min_x, max_x, min_y, max_y) (inherited from Window)
- makeButtonOnPanel(panel, x, y, w, h, sprite, on_click, on_click_self, on_rightclick) (inherited from Window)
- makeDynamicTooltip(callback, x, y, r, b, tooltip_x, tooltip_y) (inherited from Window)
- makeGameMenu(app)
- makeHotkeyBoxOnPanel(panel, confirm_callback, abort_callback) (inherited from Window)
- makeMapeditorMenu(app)
- makeScrollbarOnPanel(panel, slider_colour, callback, min_value, max_value, page_size, value) (inherited from Window)
- makeTextboxOnPanel(panel, confirm_callback, abort_callback) (inherited from Window)
- makeTooltip(text, x, y, r, b, tooltip_x, tooltip_y, apply_ui_scale) (inherited from Window)
- mustPause() (inherited from Window)
- onChangeLanguage() (overrides Window:onChangeLanguage)
- onChangeResolution() (overrides Window:onChangeResolution)
- onCursorWorldPositionChange(x, y) (inherited from Window)
- onMouseDown(button, x, y) (overrides Window:onMouseDown)
- onMouseMove(x, y, dx, dy) (overrides Window:onMouseMove)
- onMouseUp(button, x, y) (overrides Window:onMouseUp)
- onMouseWheel(x, y) (inherited from Window)
- onTick() (overrides Window:onTick)
- onWorldTick() (inherited from Window)
- removeAllPanels() (inherited from Window)
- removeKeyHandler(keys) (inherited from Window)
- removeWindow(window) (inherited from Window)
- sendToBottom(window) (inherited from Window)
- sendToTop(window) (inherited from Window)
- setDefaultPosition(x, y) (inherited from Window)
- setPosition(x, y) (inherited from Window)
- setSize(width, height, apply_ui_scale) (inherited from Window)
- startButtonBlinking(button_index) (inherited from Window)
- stopButtonBlinking() (inherited from Window)
Member Index
- active_button (*)
- active_menu
- active_scrollbar (*)
- apply_ui_scale (*)
- blink_counter (*)
- blinking_button (*)
- blue_font
- btn_repeat_delay (*)
- buttons (*)
- buttons_down (*)
- closed (*)
- cursor_x (*)
- cursor_y (*)
- default_button_sound (*)
- disappear_counter
- draggable (*)
- dragging (*)
- height
- hotkeyboxes (*)
- key_handlers (*)
- menu_disappear_counter
- menus
- on_top
- open_menus
- panel_sprites
- panels (*)
- parent (*)
- scrollbars (*)
- textboxes (*)
- tooltip_regions (*)
- ui
- visible
- white_font
- width
- windows (*)
- x
- x_original (*)
- y
- y_original (*)
function UIMenuBar:UIMenuBar(ui, map_editor)
Parameters:
| Name | Type | Description |
|---|---|---|
| ui | ? | ? |
| map_editor | ? | ? |
Declared on: line 31 of Lua/dialogs/menu.lua.
function UIMenuBar:addMenu(title, menu)
Add a menu to the menu bar.
Parameters:
| Name | Type | Description |
|---|---|---|
| title | ? | Title of the menu (at the bar). |
| menu | ? | Menu to add. |
Declared on: line 132 of Lua/dialogs/menu.lua.
function UIMenuBar:appear()
Declared on: line 342 of Lua/dialogs/menu.lua.
function UIMenuBar:calculateMenuSize(menu)
Parameters:
| Name | Type | Description |
|---|---|---|
| menu | ? | ? |
Declared on: line 445 of Lua/dialogs/menu.lua.
function UIMenuBar:draw(canvas)
Parameters:
| Name | Type | Description |
|---|---|---|
| canvas | ? | ? |
Overrides: Window:draw.
Declared on: line 151 of Lua/dialogs/menu.lua.
function UIMenuBar:drawMenu(menu, canvas)
Parameters:
| Name | Type | Description |
|---|---|---|
| menu | ? | ? |
| canvas | ? | ? |
Declared on: line 196 of Lua/dialogs/menu.lua.
function UIMenuBar:hitTestBar(x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
Declared on: line 234 of Lua/dialogs/menu.lua.
function UIMenuBar:makeGameMenu(app)
Make a menu for the game.
Parameters:
| Name | Type | Description |
|---|---|---|
| app | ? | Application. |
Declared on: line 732 of Lua/dialogs/menu.lua.
function UIMenuBar:makeMapeditorMenu(app)
Make a menu for the map editor.
Parameters:
| Name | Type | Description |
|---|---|---|
| app | ? | Application. |
Declared on: line 698 of Lua/dialogs/menu.lua.
function UIMenuBar:onChangeLanguage()
Overrides: Window:onChangeLanguage.
Declared on: line 109 of Lua/dialogs/menu.lua.
function UIMenuBar:onChangeResolution()
Overrides: Window:onChangeResolution.
Declared on: line 105 of Lua/dialogs/menu.lua.
function UIMenuBar:onMouseDown(button, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| button | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: Window:onMouseDown.
Declared on: line 357 of Lua/dialogs/menu.lua.
function UIMenuBar:onMouseMove(x, y, dx, dy)
Parameters:
| Name | Type | Description |
|---|---|---|
| x | ? | ? |
| y | ? | ? |
| dx | ? | ? |
| dy | ? | ? |
Overrides: Window:onMouseMove.
Declared on: line 251 of Lua/dialogs/menu.lua.
function UIMenuBar:onMouseUp(button, x, y)
Parameters:
| Name | Type | Description |
|---|---|---|
| button | ? | ? |
| x | ? | ? |
| y | ? | ? |
Overrides: Window:onMouseUp.
Declared on: line 386 of Lua/dialogs/menu.lua.
function UIMenuBar:onTick()
Overrides: Window:onTick.
Declared on: line 62 of Lua/dialogs/menu.lua.