Xonotic
|
#include "quickmenu.qh"
#include <client/draw.qh>
#include <client/hud/_mod.qh>
#include <client/mapvoting.qh>
#include <common/ent_cs.qh>
#include <common/minigames/cl_minigames.qh>
Go to the source code of this file.
Macros | |
#define | QM_TAG_COMMAND "C" |
#define | QM_TAG_PLCOMMAND "P" |
#define | QM_TAG_SUBMENU "S" |
#define | QM_TAG_TITLE "T" |
#define | QuickMenu_Buffer_Get() bufstr_get(QuickMenu_Buffer, QuickMenu_Buffer_Index) |
#define | QuickMenu_Buffer_Set(tag, string) bufstr_set(QuickMenu_Buffer, QuickMenu_Buffer_Size, strcat(tag, string)) |
#define | QUICKMENU_ENTRY(title, command) |
#define | QUICKMENU_ENTRY_TC(title, command, text, translated_text) |
#define | QUICKMENU_SMENU(submenu, eng_submenu) |
#define | QUICKMENU_SMENU_PL(submenu, eng_submenu, command, teamplayers, without_me) |
Functions | |
void | HUD_QuickMenu () |
void | HUD_Quickmenu_DrawEntry (vector pos, string desc, string option, vector fontsize) |
void | HUD_QuickMenu_Export (int fh) |
bool | HUD_QuickMenu_Forbidden () |
void | HUD_Quickmenu_PlayerListEntries (string cmd, int teamplayers, bool without_me) |
bool | HUD_Quickmenu_PlayerListEntries_Create (string cmd, int teamplayers, bool without_me) |
bool | QuickMenu_ActionForNumber (int num) |
void | QuickMenu_Buffer_Close () |
void | QuickMenu_Close () |
void | QuickMenu_Default (string target_submenu) |
bool | QuickMenu_InputEvent (int bInputType, float nPrimary, float nSecondary) |
bool | QuickMenu_IsOpened () |
void | QuickMenu_Mouse () |
bool | QuickMenu_Open (string mode, string submenu, string file) |
void | QuickMenu_Page_ActiveEntry (int entry_num) |
void | QuickMenu_Page_ClearEntry (int i) |
bool | QuickMenu_Page_Load (string target_submenu, bool new_page) |
void | QuickMenu_Page_LoadEntry (int i, string s, string s1) |
void | QuickMenu_skip_submenu (string submenu) |
void | QuickMenu_TimeOut_Set () |
#define QM_TAG_COMMAND "C" |
Definition at line 42 of file quickmenu.qc.
Referenced by QuickMenu_Open(), and QuickMenu_Page_Load().
#define QM_TAG_PLCOMMAND "P" |
Definition at line 43 of file quickmenu.qc.
Referenced by QuickMenu_Open(), and QuickMenu_Page_Load().
#define QM_TAG_SUBMENU "S" |
Definition at line 41 of file quickmenu.qc.
Referenced by QuickMenu_Open(), QuickMenu_Page_Load(), and QuickMenu_skip_submenu().
#define QM_TAG_TITLE "T" |
Definition at line 40 of file quickmenu.qc.
Referenced by QuickMenu_Open(), and QuickMenu_Page_Load().
#define QuickMenu_Buffer_Get | ( | ) | bufstr_get(QuickMenu_Buffer, QuickMenu_Buffer_Index) |
Definition at line 46 of file quickmenu.qc.
Referenced by QuickMenu_Page_Load(), and QuickMenu_skip_submenu().
#define QuickMenu_Buffer_Set | ( | tag, | |
string | |||
) | bufstr_set(QuickMenu_Buffer, QuickMenu_Buffer_Size, strcat(tag, string)) |
Definition at line 45 of file quickmenu.qc.
Referenced by QuickMenu_Open().
#define QUICKMENU_ENTRY | ( | title, | |
command | |||
) |
Definition at line 721 of file quickmenu.qc.
Referenced by HUD_Quickmenu_PlayerListEntries().
#define QUICKMENU_ENTRY_TC | ( | title, | |
command, | |||
text, | |||
translated_text | |||
) |
Definition at line 745 of file quickmenu.qc.
#define QUICKMENU_SMENU | ( | submenu, | |
eng_submenu | |||
) |
Definition at line 709 of file quickmenu.qc.
Referenced by QuickMenu_Default().
#define QUICKMENU_SMENU_PL | ( | submenu, | |
eng_submenu, | |||
command, | |||
teamplayers, | |||
without_me | |||
) |
Definition at line 731 of file quickmenu.qc.
void HUD_QuickMenu | ( | ) |
Definition at line 589 of file quickmenu.qc.
References autocvar__hud_configure, hud_draw_maximized, HUD_QuickMenu_Forbidden(), QuickMenu_Close(), QuickMenu_IsOpened(), QuickMenu_Page_Entries, and QuickMenu_Page_LoadEntry().
Definition at line 553 of file quickmenu.qc.
References autocvar_hud_panel_quickmenu_align, drawcolorcodedstring(), DRAWFLAG_ADDITIVE, drawpic(), eX, hud_skin_path, max(), min(), panel_fg_alpha, panel_size, precache_pic(), strcat(), textShortenToWidth(), vec2, and vector().
bool HUD_QuickMenu_Forbidden | ( | ) |
Definition at line 70 of file quickmenu.qc.
References hud_configure_prev, HUD_MinigameMenu_IsOpened(), mv_active, QuickMenu_TimeOut, and time.
Referenced by HUD_QuickMenu(), and QuickMenu_Open().
Definition at line 761 of file quickmenu.qc.
References entity(), NUM_SPECTATOR, player_localnum, players, QUICKMENU_ENTRY, strcat(), TC, and team_count.
Referenced by HUD_Quickmenu_PlayerListEntries_Create().
Definition at line 249 of file quickmenu.qc.
References buf_create, HUD_Quickmenu_PlayerListEntries(), QuickMenu_Buffer, QuickMenu_Buffer_Close(), QuickMenu_Buffer_Size, QUICKMENU_MAXLINES, QuickMenu_Page_ClearEntry(), and TC.
Referenced by QuickMenu_Page_Load().
Definition at line 386 of file quickmenu.qc.
References localcmd, QuickMenu_CurrentSubMenu, QuickMenu_IsLastPage, QUICKMENU_MAXLINES, QuickMenu_Page_ActivatedEntry_Time, QuickMenu_Page_Command, QuickMenu_Page_Description, QuickMenu_Page_Entries, QuickMenu_Page_Load(), QuickMenu_TimeOut_Set(), strcat(), TC, and time.
Referenced by QuickMenu_Page_ActiveEntry().
void QuickMenu_Buffer_Close | ( | ) |
Definition at line 206 of file quickmenu.qc.
References QuickMenu_Buffer, and QuickMenu_Buffer_Size.
Referenced by HUD_Quickmenu_PlayerListEntries_Create(), and QuickMenu_Close().
void QuickMenu_Close | ( | ) |
Definition at line 216 of file quickmenu.qc.
References mouseClicked, prevMouseClicked, QuickMenu_Buffer_Close(), QuickMenu_CurrentSubMenu, QUICKMENU_MAXLINES, QuickMenu_Page_ClearEntry(), QuickMenu_Page_Entries, and strfree.
Referenced by HUD_QuickMenu(), LocalCommand_hud(), QuickMenu_InputEvent(), QuickMenu_Mouse(), and QuickMenu_Page_Load().
Definition at line 788 of file quickmenu.qc.
References QUICKMENU_BUFFER_MAXENTRIES, QuickMenu_Buffer_Size, and QUICKMENU_SMENU.
Referenced by QuickMenu_Open().
Definition at line 432 of file quickmenu.qc.
References argv(), autocvar__hud_configure, chr2str, hudShiftState, K_ALT, K_CTRL, K_ESCAPE, K_MOUSE1, K_MOUSE2, K_SHIFT, mouseClicked, mousepos, mv_active, QuickMenu_Close(), QuickMenu_IsOpened(), QuickMenu_Page_ActiveEntry(), S_ALT, S_CTRL, S_MOUSE1, S_MOUSE2, S_SHIFT, stof(), TC, and tokenize().
Referenced by CSQC_InputEvent().
bool QuickMenu_IsOpened | ( | ) |
Definition at line 244 of file quickmenu.qc.
References QuickMenu_Page_Entries.
Referenced by HUD_Main(), HUD_Mouse(), HUD_QuickMenu(), HUD_WouldShowCursor(), LocalCommand_hud(), QuickMenu_InputEvent(), Scoreboard_WouldDraw(), and View_Lock().
void QuickMenu_Mouse | ( | ) |
Definition at line 497 of file quickmenu.qc.
References color, drawfill(), DRAWFLAG_NORMAL, entry_num_prev, floor(), HUD_PANEL, HUD_Panel_LoadCvars(), hudShiftState, min(), mouseClicked, mousepos, mv_active, panel, panel_bg_padding, panel_pos, panel_size, prevMouseClicked, QuickMenu_Close(), QuickMenu_IsLastPage, QUICKMENU_MAXLINES, QuickMenu_Page_ActivatedEntry_Time, QuickMenu_Page_ActiveEntry(), QuickMenu_Page_Entries, QuickMenu_TimeOut_Set(), S_CTRL, S_MOUSE1, S_MOUSE2, time, vec2, and vector().
Referenced by HUD_Mouse().
Definition at line 79 of file quickmenu.qc.
References argv(), buf_create, fclose(), fgets(), FILE_READ, fopen(), ftos(), HUD_QuickMenu_Forbidden(), hudShiftState, localcmd, LOG_INFO, LOG_INFOF, LOG_WARNF, mouseClicked, QM_TAG_COMMAND, QM_TAG_PLCOMMAND, QM_TAG_SUBMENU, QM_TAG_TITLE, QuickMenu_Buffer, QUICKMENU_BUFFER_MAXENTRIES, QuickMenu_Buffer_Set, QuickMenu_Buffer_Size, QuickMenu_Default(), QuickMenu_Page_Load(), QuickMenu_TimeOut, QuickMenu_TimeOut_Set(), strcat(), and tokenize_console.
Referenced by LocalCommand_hud().
Definition at line 415 of file quickmenu.qc.
References hudShiftState, QuickMenu_ActionForNumber(), QuickMenu_Page_ActivatedEntry, QuickMenu_Page_ActivatedEntry_Close, QuickMenu_Page_Command, QuickMenu_Page_Command_Type, S_CTRL, and TC.
Referenced by QuickMenu_InputEvent(), and QuickMenu_Mouse().
Definition at line 62 of file quickmenu.qc.
References QuickMenu_Page_Command, QuickMenu_Page_Command_Type, QuickMenu_Page_Description, strfree, and TC.
Referenced by HUD_Quickmenu_PlayerListEntries_Create(), QuickMenu_Close(), and QuickMenu_Page_Load().
Definition at line 274 of file quickmenu.qc.
References argv(), cmd(), HUD_Quickmenu_PlayerListEntries_Create(), LOG_WARNF, QM_TAG_COMMAND, QM_TAG_PLCOMMAND, QM_TAG_SUBMENU, QM_TAG_TITLE, QuickMenu_Buffer_Get, QuickMenu_Buffer_Index, QuickMenu_Buffer_Index_Prev, QuickMenu_Buffer_Size, QuickMenu_Close(), QuickMenu_CurrentSubMenu, QuickMenu_IsLastPage, QUICKMENU_MAXLINES, QuickMenu_Page, QuickMenu_Page_ActivatedEntry, QuickMenu_Page_ClearEntry(), QuickMenu_Page_Command_Type, QuickMenu_Page_Entries, QuickMenu_Page_LoadEntry(), QuickMenu_skip_submenu(), QuickMenu_TimeOut_Set(), stof(), strcpy, string_null, strunzone(), strzone(), substring(), TC, and tokenize_console.
Referenced by QuickMenu_ActionForNumber(), and QuickMenu_Open().
Definition at line 54 of file quickmenu.qc.
References QuickMenu_Page_Command, QuickMenu_Page_Description, strcpy, and TC.
Referenced by HUD_QuickMenu(), and QuickMenu_Page_Load().
Definition at line 229 of file quickmenu.qc.
References QM_TAG_SUBMENU, QuickMenu_Buffer_Get, QuickMenu_Buffer_Index, QuickMenu_Buffer_Size, strcpy, strfree, string_null, and substring().
Referenced by QuickMenu_Page_Load().
void QuickMenu_TimeOut_Set | ( | ) |
Definition at line 48 of file quickmenu.qc.
References autocvar_hud_panel_quickmenu_time, QuickMenu_TimeOut, and time.
Referenced by QuickMenu_ActionForNumber(), QuickMenu_Mouse(), QuickMenu_Open(), and QuickMenu_Page_Load().
int entry_num_prev = 0 |
Definition at line 496 of file quickmenu.qc.
Referenced by QuickMenu_Mouse().
int QuickMenu_Buffer = -1 |
Definition at line 33 of file quickmenu.qc.
Referenced by HUD_Quickmenu_PlayerListEntries_Create(), QuickMenu_Buffer_Close(), and QuickMenu_Open().
int QuickMenu_Buffer_Index |
Definition at line 35 of file quickmenu.qc.
Referenced by QuickMenu_Page_Load(), and QuickMenu_skip_submenu().
int QuickMenu_Buffer_Index_Prev |
Definition at line 273 of file quickmenu.qc.
Referenced by QuickMenu_Page_Load().
const int QUICKMENU_BUFFER_MAXENTRIES = 2 * QUICKMENU_MAXENTRIES |
Definition at line 32 of file quickmenu.qc.
Referenced by QuickMenu_Default(), and QuickMenu_Open().
int QuickMenu_Buffer_Size |
Definition at line 34 of file quickmenu.qc.
Referenced by HUD_Quickmenu_PlayerListEntries_Create(), QuickMenu_Buffer_Close(), QuickMenu_Default(), QuickMenu_Open(), QuickMenu_Page_Load(), and QuickMenu_skip_submenu().
string QuickMenu_CurrentSubMenu |
Definition at line 36 of file quickmenu.qc.
Referenced by QuickMenu_ActionForNumber(), QuickMenu_Close(), and QuickMenu_Page_Load().
bool QuickMenu_IsLastPage |
Definition at line 28 of file quickmenu.qc.
Referenced by QuickMenu_ActionForNumber(), QuickMenu_Mouse(), and QuickMenu_Page_Load().
const int QUICKMENU_MAXENTRIES = 256 |
Definition at line 31 of file quickmenu.qc.
const int QUICKMENU_MAXLINES = 10 |
Definition at line 18 of file quickmenu.qc.
Referenced by HUD_Quickmenu_PlayerListEntries_Create(), QuickMenu_ActionForNumber(), QuickMenu_Close(), QuickMenu_Mouse(), and QuickMenu_Page_Load().
int QuickMenu_Page |
Definition at line 24 of file quickmenu.qc.
Referenced by QuickMenu_Page_Load().
int QuickMenu_Page_ActivatedEntry = -1 |
Definition at line 25 of file quickmenu.qc.
Referenced by QuickMenu_Page_ActiveEntry(), and QuickMenu_Page_Load().
bool QuickMenu_Page_ActivatedEntry_Close |
Definition at line 26 of file quickmenu.qc.
Referenced by QuickMenu_Page_ActiveEntry().
float QuickMenu_Page_ActivatedEntry_Time |
Definition at line 27 of file quickmenu.qc.
Referenced by QuickMenu_ActionForNumber(), and QuickMenu_Mouse().
string QuickMenu_Page_Command[QUICKMENU_MAXLINES] |
Definition at line 20 of file quickmenu.qc.
Referenced by QuickMenu_ActionForNumber(), QuickMenu_Page_ActiveEntry(), QuickMenu_Page_ClearEntry(), and QuickMenu_Page_LoadEntry().
int QuickMenu_Page_Command_Type[QUICKMENU_MAXLINES] |
Definition at line 22 of file quickmenu.qc.
Referenced by QuickMenu_Page_ActiveEntry(), QuickMenu_Page_ClearEntry(), and QuickMenu_Page_Load().
string QuickMenu_Page_Description[QUICKMENU_MAXLINES] |
Definition at line 21 of file quickmenu.qc.
Referenced by QuickMenu_ActionForNumber(), QuickMenu_Page_ClearEntry(), and QuickMenu_Page_LoadEntry().
int QuickMenu_Page_Entries |
Definition at line 23 of file quickmenu.qc.
Referenced by HUD_QuickMenu(), QuickMenu_ActionForNumber(), QuickMenu_Close(), QuickMenu_IsOpened(), QuickMenu_Mouse(), and QuickMenu_Page_Load().
float QuickMenu_TimeOut |
Definition at line 37 of file quickmenu.qc.
Referenced by HUD_QuickMenu_Forbidden(), QuickMenu_Open(), and QuickMenu_TimeOut_Set().