Xonotic
|
#include "menu.qh"
#include "item.qh"
#include "anim/animhost.qh"
#include "item/dialog.qh"
#include "item/listbox.qh"
#include "item/nexposee.qh"
#include "xonotic/commandbutton.qh"
#include "xonotic/mainwindow.qh"
#include "xonotic/serverlist.qh"
#include "xonotic/slider_resolution.qh"
#include "xonotic/util.qh"
#include <common/items/_mod.qh>
#include <common/weapons/_all.qh>
#include <common/mapinfo.qh>
#include <common/mutators/base.qh>
Go to the source code of this file.
Enumerations | |
enum | { SCALEMODE_CROP, SCALEMODE_LETTERBOX, SCALEMODE_WIDTH, SCALEMODE_HEIGHT, SCALEMODE_STRETCH } |
Functions | |
void | draw_Picture_Aligned (vector algn, float scalemode, string img, float a) |
void | draw_reset_cropped () |
void | draw_reset_full () |
void | drawBackground (string img, float a, string algn, float force1) |
string | gettooltip () |
void | m_activate_window (entity wnd) |
bool | m_allocatetooltipbox (vector pos) |
void | m_display () |
void | m_draw (float width, float height) |
entity | m_findtooltipitem (entity root, vector pos) |
void | m_focus_item_chain (entity outermost, entity innermost) |
void | m_gamestatus () |
void | m_goto (string itemname) |
void | m_hide () |
void | m_init () |
void | m_init_delayed () |
void | m_keydown (float key, float ascii) |
void | m_keyup (float key, float ascii) |
void | m_play_click_sound (string soundfile) |
void | m_play_focus_sound () |
void | m_setpointerfocus (entity wnd) |
void | m_sync () |
bool | m_testmousetooltipbox (vector pos) |
bool | m_testtooltipbox (vector tooltippos) |
void | m_toggle (int mode) |
void | m_tooltip (vector pos) |
void | Shutdown () |
void | UpdateConWidthHeight (float w, float h, float p) |
anonymous enum |
Definition at line 303 of file menu.qc.
References draw_Picture(), draw_PictureSize(), draw_scale, eX, eY, SCALEMODE_CROP, SCALEMODE_HEIGHT, SCALEMODE_LETTERBOX, SCALEMODE_STRETCH, SCALEMODE_WIDTH, and vector().
Referenced by drawBackground().
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 draw_reset_full | ( | ) |
Definition at line 113 of file menu.qc.
References draw_reset(), realconheight, and realconwidth.
Referenced by m_draw().
Definition at line 333 of file menu.qc.
References draw_Picture_Aligned(), ftos(), LABEL, main, random(), SCALEMODE_CROP, SCALEMODE_HEIGHT, SCALEMODE_LETTERBOX, SCALEMODE_STRETCH, SCALEMODE_WIDTH, strcat(), strlen(), substring(), v, and vector().
Referenced by m_draw().
string gettooltip | ( | ) |
Definition at line 503 of file menu.qc.
References cvar_string(), getCvarsMulti(), menu_tooltips, menuTooltipItem, and strcat().
Referenced by m_tooltip().
Definition at line 910 of file menu.qc.
References Container_setFocus(), entity(), NULL, and TabButton_Click().
Referenced by m_goto().
Definition at line 432 of file menu.qc.
References conheight, conwidth, m_testtooltipbox(), menuTooltipSize, v, and vector().
Referenced by m_tooltip().
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 676 of file menu.qc.
References anim, autocvar_menu_force_on_disconnection, bound(), clientstate(), CS_DISCONNECTED, cvar(), cvar_set(), draw_alpha, draw_drawMousePointer(), draw_Fill(), draw_reset_cropped(), draw_reset_full(), draw_scale, draw_shift, drawBackground(), eX, execute_next_frame(), eY, frametime, ftos(), GAME_CONNECTED, GAME_ISSERVER, gamestatus, getkeydest(), getmousepos(), getmousetarget(), gettime(), globalToBox(), globalToBoxSize(), IL_ENDFRAME(), KEY_MENU, KEY_MENU_GRABBED, keyGrabber, localcmd, m_gamestatus(), m_hide(), m_init_delayed(), m_toggle(), m_tooltip(), main, max(), Menu_Active, menuAlpha, menuInitialized, menuLogoAlpha, menuMouseMode, menuMousePos, menuNotTheFirstFrame, menuPrevTime, min(), mouseButtonsPressed, MT_CLIENT, MT_MENU, postMenuDraw(), preMenuDraw(), prevMenuAlpha, realconheight, realconwidth, setkeydest(), time, UpdateConWidthHeight(), and vector().
Definition at line 470 of file menu.qc.
References best, entity(), globalToBox(), menu_tooltips, and NULL.
Referenced by m_tooltip().
Definition at line 904 of file menu.qc.
Referenced by m_setpointerfocus().
void m_gamestatus | ( | ) |
Definition at line 48 of file menu.qc.
References clientstate(), CS_CONNECTED, cvar(), GAME_CONNECTED, GAME_DEVELOPER, GAME_ISSERVER, gamestatus, isdemo(), and isserver().
Referenced by m_draw().
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().
void m_init | ( | ) |
Definition at line 56 of file menu.qc.
References cvar(), cvar_set(), cvar_string(), GETGAMEDIRINFO_DESCRIPTION, GETGAMEDIRINFO_NAME, localcmd, LOG_TRACE, LOG_TRACEF, m_display(), m_hide(), prvm_language, RegisterSLCategories(), static_init, static_init_late, static_init_precache, strzone(), and updateCompression().
void m_init_delayed | ( | ) |
Definition at line 158 of file menu.qc.
References anim, argv(), argv_end_index, argv_start_index, conheight, conwidth, cvar_defstring(), cvar_set(), cvar_string(), draw_currentSkin, draw_reset_cropped(), draw_setMousePointer(), error(), eX, eY, fclose(), fgets(), FILE_READ, fopen(), m_display(), m_goto(), m_goto_buffer, m_sync(), main, Menu_Active, menuInitialized, menuMousePos, menuShiftState, NEW, precache_pic(), preMenuInit(), search_begin(), search_end(), search_getfilename(), search_getsize(), strcat(), strfree, strzone(), substring(), and tokenize_console.
Referenced by m_draw().
Definition at line 247 of file menu.qc.
References draw_reset_cropped(), entity(), GAME_CONNECTED, GAME_ISSERVER, gamestatus, getmousepos(), K_ALT, K_CTRL, K_ESCAPE, K_MOUSE1, K_MOUSE3, K_SHIFT, keyGrabber, LOG_TRACE, m_hide(), main, Menu_Active, menuInitialized, menuMouseMode, menuMousePos, menuShiftState, mouseButtonsPressed, NULL, realconheight, realconwidth, S_ALT, S_CTRL, S_SHIFT, and vector().
Definition at line 226 of file menu.qc.
References draw_reset_cropped(), K_ALT, K_CTRL, K_MOUSE1, K_MOUSE3, K_SHIFT, LOG_TRACE, main, Menu_Active, menuInitialized, menuMousePos, menuShiftState, mouseButtonsPressed, S_ALT, S_CTRL, and S_SHIFT.
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.
Definition at line 938 of file menu.qc.
References conheight, conwidth, entity(), m_focus_item_chain(), and menuMousePos.
Referenced by m_goto().
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().
Definition at line 416 of file menu.qc.
References menuTooltipOrigin, and menuTooltipSize.
Referenced by m_tooltip().
Definition at line 423 of file menu.qc.
References menuTooltipOrigin, and menuTooltipSize.
Referenced by m_allocatetooltipbox().
Definition at line 881 of file menu.qc.
References m_display(), m_hide(), and Menu_Active.
Referenced by m_draw().
Definition at line 530 of file menu.qc.
References bound(), conheight, conwidth, cvar(), draw_BorderPicture(), draw_Text(), draw_TextWidth(), draw_TextWidth_WithoutColors(), entity(), frametime, gettooltip(), getWrappedLine(), getWrappedLine_remaining, m_allocatetooltipbox(), m_findtooltipitem(), m_testmousetooltipbox(), main, menu_tooltips, menu_tooltips_old, menuTooltipAlpha, menuTooltipAveragedMousePos, menuTooltipItem, menuTooltipOrigin, menuTooltipSize, menuTooltipState, menuTooltipText, NULL, strcpy, strfree, vdist, and vector().
Referenced by m_draw().
void Shutdown | ( | ) |
Definition at line 895 of file menu.qc.
References FOREACH_ENTITY_ORDERED, and m_hide().
Definition at line 118 of file menu.qc.
References conheight, conheight_s, conwidth, conwidth_s, cvar(), cvar_string(), draw_reset_cropped(), eX, eY, localcmd, main, MENU_ASPECT, realconheight, realconwidth, updateConwidths(), vidheight_s, vidpixelheight_s, and vidwidth_s.
Referenced by m_draw().
float autocvar_menu_force_on_disconnection |
float conheight_s |
Definition at line 36 of file menu.qc.
Referenced by UpdateConWidthHeight().
float conwidth_s |
Definition at line 36 of file menu.qc.
Referenced by UpdateConWidthHeight().
string m_goto_buffer |
Definition at line 157 of file menu.qc.
Referenced by m_goto(), and m_init_delayed().
const float MENU_ASPECT = 1280 / 1024 |
Definition at line 107 of file menu.qc.
Referenced by UpdateConWidthHeight().
int menu_tooltips |
Definition at line 407 of file menu.qc.
Referenced by gettooltip(), m_findtooltipitem(), and m_tooltip().
int menu_tooltips_old |
Definition at line 408 of file menu.qc.
Referenced by m_tooltip().
bool menuInitialized |
Definition at line 32 of file menu.qc.
Referenced by m_display(), m_draw(), m_goto(), m_hide(), m_init_delayed(), m_keydown(), and m_keyup().
int menuMouseMode |
Definition at line 34 of file menu.qc.
Referenced by m_display(), m_draw(), and m_keydown().
vector menuMousePos |
Definition at line 26 of file menu.qc.
Referenced by m_display(), m_draw(), m_init_delayed(), m_keydown(), m_keyup(), and m_setpointerfocus().
int menuShiftState |
Definition at line 27 of file menu.qc.
Referenced by m_init_delayed(), m_keydown(), and m_keyup().
float menuTooltipAlpha |
Definition at line 413 of file menu.qc.
Referenced by m_tooltip().
vector menuTooltipAveragedMousePos |
Definition at line 409 of file menu.qc.
Referenced by m_tooltip().
entity menuTooltipItem |
Definition at line 410 of file menu.qc.
Referenced by gettooltip(), and m_tooltip().
vector menuTooltipOrigin |
Definition at line 411 of file menu.qc.
Referenced by m_testmousetooltipbox(), m_testtooltipbox(), and m_tooltip().
vector menuTooltipSize |
Definition at line 412 of file menu.qc.
Referenced by m_allocatetooltipbox(), m_testmousetooltipbox(), m_testtooltipbox(), and m_tooltip().
int menuTooltipState |
Definition at line 415 of file menu.qc.
Referenced by m_tooltip().
string menuTooltipText |
Definition at line 414 of file menu.qc.
Referenced by m_tooltip().
int mouseButtonsPressed |
Definition at line 25 of file menu.qc.
Referenced by m_display(), m_draw(), m_keydown(), and m_keyup().
float realconheight |
Definition at line 38 of file menu.qc.
Referenced by draw_reset_cropped(), draw_reset_full(), m_draw(), m_keydown(), and UpdateConWidthHeight().
float realconwidth |
Definition at line 38 of file menu.qc.
Referenced by draw_reset_cropped(), draw_reset_full(), m_draw(), m_keydown(), and UpdateConWidthHeight().
float vidheight_s |
Definition at line 37 of file menu.qc.
Referenced by m_sync(), and UpdateConWidthHeight().
float vidpixelheight_s |
Definition at line 37 of file menu.qc.
Referenced by m_sync(), and UpdateConWidthHeight().
float vidwidth_s |
Definition at line 37 of file menu.qc.
Referenced by m_sync(), and UpdateConWidthHeight().