Xonotic
|
#include "draw.qh"
#include "skin.qh"
#include "xonotic/util.qh"
#include <common/constants.qh>
#include <common/util.qh>
Go to the source code of this file.
Functions | |
void | draw_reset_cropped () |
void | m_display () |
void | m_goto (string name) |
void | m_hide () |
void | m_play_click_sound (string soundfile) |
void | m_play_focus_sound () |
void | m_sync () |
void | postMenuDraw () |
this is run just after the menu is drawn (or not). More... | |
void | preMenuDraw () |
this is run before the menu is drawn. More... | |
float | preMenuInit () |
you have to define this for pre-menu initialization. More... | |
void (entity this, float key, float ascii) keyGrabbed | |
Variables | |
entity | anim |
float | conheight |
float | conwidth |
float | frametime |
const int | GAME_CONNECTED = BIT(1) |
const int | GAME_DEVELOPER = BIT(2) |
const int | GAME_ISSERVER = BIT(0) |
int | gamestatus |
entity | keyGrabber |
entity | main |
bool | Menu_Active |
const string | MENU_SOUND_CLEAR = "sound/menu/clear.wav" |
const string | MENU_SOUND_CLOSE = "sound/menu/close.wav" |
const string | MENU_SOUND_EXECUTE = "sound/menu/execute.wav" |
const string | MENU_SOUND_FOCUS = "sound/menu/focus.wav" |
const string | MENU_SOUND_OPEN = "sound/menu/open.wav" |
const string | MENU_SOUND_SELECT = "sound/menu/select.wav" |
const string | MENU_SOUND_SLIDE = "sound/menu/slide.wav" |
const string | MENU_SOUND_WINNER = "sound/menu/winner.wav" |
string | name |
const int | S_ALT = 4 |
const int | S_CTRL = 2 |
const int | S_SHIFT = 1 |
float | time |
void draw_reset_cropped | ( | ) |
Definition at line 109 of file menu.qc.
References conheight, conwidth, draw_reset(), realconheight, and realconwidth.
Referenced by m_draw(), m_init_delayed(), m_keydown(), m_keyup(), preMenuInit(), and UpdateConWidthHeight().
void m_display | ( | ) |
Definition at line 854 of file menu.qc.
References KEY_MENU, main, Menu_Active, menuInitialized, menuMouseMode, menuMousePos, mouseButtonsPressed, MT_CLIENT, MT_MENU, setkeydest(), and setmousetarget().
Referenced by m_goto(), m_init(), m_init_delayed(), and m_toggle().
Definition at line 951 of file menu.qc.
References entity(), find(), GAME_CONNECTED, GAME_ISSERVER, gamestatus, m_activate_window(), m_display(), m_goto_buffer, m_hide(), m_setpointerfocus(), main, Menu_Active, menuInitialized, name, NULL, and strcpy.
Referenced by GameCommand(), m_init_delayed(), XonoticCommandButton_Click(), XonoticNexposee_close(), and XonoticRootDialog_close().
void m_hide | ( | ) |
Definition at line 869 of file menu.qc.
References KEY_GAME, main, Menu_Active, menuInitialized, MT_CLIENT, setkeydest(), and setmousetarget().
Referenced by Dialog_close(), m_draw(), m_goto(), m_init(), m_keydown(), m_toggle(), and Shutdown().
Definition at line 997 of file menu.qc.
References cvar(), and localsound().
Referenced by Button_playClickSound(), CheckBox_playClickSound(), Dialog_keyDown(), GameCommand(), InputBox_keyDown(), InputBox_mouseRelease(), KeyBinder_Bind_Clear(), Nexposee_draw(), Nexposee_keyDown(), ServerList_Favorite_Click(), Slider_keyUp(), Slider_mouseRelease(), XonoticColorpicker_mouseRelease(), XonoticColorpickerString_mouseRelease(), XonoticGametypeList_clickListBoxItem(), XonoticGametypeList_keyDown(), XonoticHUDSkinList_doubleClickListBoxItem(), XonoticKeyBinder_keyGrabbed(), XonoticLanguageList_doubleClickListBoxItem(), XonoticLanguageList_keyDown(), XonoticMapList_clickListBoxItem(), XonoticMapList_doubleClickListBoxItem(), XonoticMapList_keyDown(), XonoticServerList_keyDown(), XonoticSkinList_doubleClickListBoxItem(), XonoticSkinList_keyDown(), and XonoticWinnerDialog_focusEnter().
void m_play_focus_sound | ( | ) |
Definition at line 988 of file menu.qc.
References cvar(), localsound(), MENU_SOUND_FOCUS, and time.
void m_sync | ( | ) |
Definition at line 40 of file menu.qc.
References loadAllCvars(), main, updateCompression(), vidheight_s, vidpixelheight_s, and vidwidth_s.
Referenced by GameCommand(), and m_init_delayed().
void postMenuDraw | ( | ) |
this is run just after the menu is drawn (or not).
Useful to draw something over everything else.
Definition at line 559 of file util.qc.
References DialogOpenButton_Click_withCoords(), entity(), and vector().
Referenced by m_draw().
void preMenuDraw | ( | ) |
this is run before the menu is drawn.
You may put some stuff there that has to be done every frame.
Definition at line 562 of file util.qc.
References draw_scale, eX, eY, GAME_CONNECTED, GAME_ISSERVER, gamestatus, updateCheck(), and vector().
Referenced by m_draw().
float preMenuInit | ( | ) |
you have to define this for pre-menu initialization.
Return 0 if initialization needs to be retried a frame later, 1 if it succeeded.
Definition at line 522 of file util.qc.
References _MapInfo_FilterGametype(), draw_CenterText(), draw_reset_cropped(), draw_scale, eX, eY, MapInfo_Cache_Create(), MapInfo_Enumerate(), MAPINFO_TYPE_ALL, random(), updateCheck(), and vector().
Referenced by m_init_delayed().
entity anim |
Definition at line 25 of file menu.qh.
Referenced by m_draw(), m_init_delayed(), makeHostedEasing(), makeHostedKeyframe(), and Slider_draw().
float conheight |
Definition at line 36 of file menu.qh.
Referenced by BorderImage_recalcPositionWithText(), Dialog_configureDialog(), draw_reset_cropped(), m_allocatetooltipbox(), m_init_delayed(), m_setpointerfocus(), m_tooltip(), MainWindow_configureMainWindow(), MainWindow_draw(), and UpdateConWidthHeight().
float conwidth |
Definition at line 36 of file menu.qh.
Referenced by BorderImage_recalcPositionWithText(), Dialog_configureDialog(), draw_reset_cropped(), m_allocatetooltipbox(), m_init_delayed(), m_setpointerfocus(), m_tooltip(), MainWindow_draw(), and UpdateConWidthHeight().
Definition at line 12 of file menu.qh.
Referenced by CheckSendCvars(), DemoConfirm_Check_Gamestatus(), DemoConfirm_ListClick_Check_Gamestatus(), HUDSetup_Check_Gamestatus(), HUDSetup_Start(), m_draw(), m_gamestatus(), m_goto(), m_keydown(), MainWindow_draw(), preMenuDraw(), and XonoticLanguageList_setLanguage().
Definition at line 13 of file menu.qh.
Referenced by m_gamestatus().
Definition at line 11 of file menu.qh.
Referenced by CheckSendCvars(), DemoConfirm_Check_Gamestatus(), DemoConfirm_ListClick_Check_Gamestatus(), HUDSetup_Check_Gamestatus(), HUDSetup_Start(), m_draw(), m_gamestatus(), m_goto(), m_keydown(), MainWindow_draw(), and preMenuDraw().
int gamestatus |
Definition at line 16 of file menu.qh.
Referenced by CheckSendCvars(), DemoConfirm_Check_Gamestatus(), DemoConfirm_ListClick_Check_Gamestatus(), HUDSetup_Check_Gamestatus(), HUDSetup_Start(), m_draw(), m_gamestatus(), m_goto(), m_keydown(), MainWindow_draw(), preMenuDraw(), and XonoticLanguageList_setLanguage().
entity keyGrabber |
Definition at line 32 of file menu.qh.
Referenced by KeyBinder_Bind_Change(), m_draw(), m_keydown(), and XonoticKeyBinder_drawListBoxItem().
entity main |
Definition at line 26 of file menu.qh.
Referenced by Close_Clicked(), DemoConfirm_Check_Gamestatus(), DemoConfirm_ListClick_Check_Gamestatus(), drawBackground(), GameCommand(), HUDSetup_Check_Gamestatus(), m_display(), m_draw(), m_goto(), m_hide(), m_init_delayed(), m_keydown(), m_keyup(), m_sync(), m_tooltip(), ServerList_Info_Click(), UpdateConWidthHeight(), XonoticLanguageList_setLanguage(), XonoticMapList_doubleClickListBoxItem(), XonoticMapList_keyDown(), and XonoticServerList_keyDown().
bool Menu_Active |
Definition at line 15 of file menu.qh.
Referenced by m_display(), m_draw(), m_goto(), m_hide(), m_init_delayed(), m_keydown(), m_keyup(), m_toggle(), and updateCheck().
const string MENU_SOUND_CLEAR = "sound/menu/clear.wav" |
Definition at line 49 of file menu.qh.
Referenced by InputBox_keyDown(), InputBox_mouseRelease(), and KeyBinder_Bind_Clear().
const string MENU_SOUND_CLOSE = "sound/menu/close.wav" |
Definition at line 50 of file menu.qh.
Referenced by Button_playClickSound(), Dialog_keyDown(), Nexposee_draw(), and Nexposee_keyDown().
const string MENU_SOUND_EXECUTE = "sound/menu/execute.wav" |
Definition at line 51 of file menu.qh.
Referenced by Button_playClickSound(), XonoticGametypeList_keyDown(), XonoticHUDSkinList_doubleClickListBoxItem(), XonoticLanguageList_doubleClickListBoxItem(), XonoticLanguageList_keyDown(), XonoticSkinList_doubleClickListBoxItem(), and XonoticSkinList_keyDown().
const string MENU_SOUND_FOCUS = "sound/menu/focus.wav" |
Definition at line 52 of file menu.qh.
Referenced by m_play_focus_sound().
const string MENU_SOUND_OPEN = "sound/menu/open.wav" |
Definition at line 53 of file menu.qh.
Referenced by Button_playClickSound(), GameCommand(), Nexposee_draw(), Nexposee_keyDown(), XonoticMapList_doubleClickListBoxItem(), XonoticMapList_keyDown(), and XonoticServerList_keyDown().
const string MENU_SOUND_SELECT = "sound/menu/select.wav" |
Definition at line 54 of file menu.qh.
Referenced by CheckBox_playClickSound(), ServerList_Favorite_Click(), XonoticGametypeList_clickListBoxItem(), XonoticKeyBinder_keyGrabbed(), XonoticMapList_clickListBoxItem(), and XonoticMapList_keyDown().
const string MENU_SOUND_SLIDE = "sound/menu/slide.wav" |
Definition at line 55 of file menu.qh.
Referenced by Slider_keyUp(), Slider_mouseRelease(), XonoticColorpicker_mouseRelease(), and XonoticColorpickerString_mouseRelease().
const string MENU_SOUND_WINNER = "sound/menu/winner.wav" |
Definition at line 56 of file menu.qh.
Referenced by XonoticWinnerDialog_focusEnter().
string name |
Definition at line 30 of file menu.qh.
Referenced by ACCUMULATE_call(), addPowerupItem(), bot_setnameandstuff(), Client::Client ::Client(), GameTypeVote_ReadOption(), m_goto(), MX_Nick(), STATIC_INIT(), TeamScore_Spawn(), viewmodel_draw(), W_Model(), and XonoticSkinList_getSkins().