Xonotic
|
#include "keybinder.qh"
#include <common/weapons/_all.qh>
#include "button.qh"
#include "dialog_settings_input_userbind.qh"
Go to the source code of this file.
Macros | |
#define | ADD_TO_W_LIST(pred) |
#define | KEYBIND_DEF(func, desc) |
#define | KEYBIND_EMPTY_LINE() KEYBIND_DEF("", "") |
#define | KEYBIND_HEADER(str) KEYBIND_DEF("", str) |
#define | KEYBIND_IS_SPECIAL(func) (substring(func, 0 ,1) == "*") |
#define | KEYBIND_SPECIAL_DEF(key, desc) KEYBIND_DEF(strcat("*", key), desc) |
Variables | |
int | flags |
const string | KEY_NOT_BOUND_CMD = "// not bound" |
int | KeyBinds_Count = -1 |
string | KeyBinds_Descriptions [MAX_KEYBINDS] |
string | KeyBinds_Functions [MAX_KEYBINDS] |
const int | MAX_KEYBINDS = 256 |
const int | MAX_KEYS_PER_FUNCTION = 2 |
#define ADD_TO_W_LIST | ( | pred | ) |
#define KEYBIND_DEF | ( | func, | |
desc | |||
) |
#define KEYBIND_EMPTY_LINE | ( | ) | KEYBIND_DEF("", "") |
#define KEYBIND_HEADER | ( | str | ) | KEYBIND_DEF("", str) |
Referenced by KeyBinds_BuildList().
#define KEYBIND_IS_SPECIAL | ( | func | ) | (substring(func, 0 ,1) == "*") |
#define KEYBIND_SPECIAL_DEF | ( | key, | |
desc | |||
) | KEYBIND_DEF(strcat("*", key), desc) |
Definition at line 206 of file keybinder.qc.
References KEYBIND_IS_SPECIAL, KeyBinds_Functions, and keyGrabber.
Referenced by XonoticKeyBinder_doubleClickListBoxItem(), XonoticKeyBinder_keyDown(), and XonoticKeyBinder_keyGrabbed().
Definition at line 313 of file keybinder.qc.
References argv(), cvar_set(), KEY_NOT_BOUND_CMD, KEYBIND_IS_SPECIAL, KeyBinds_Functions, keynumtostring(), localcmd, m_play_click_sound(), MENU_SOUND_CLEAR, stof(), and tokenize().
Referenced by XonoticKeyBinder_keyDown().
Definition at line 294 of file keybinder.qc.
References cvar_string(), DialogOpenButton_Click(), KEYBIND_IS_SPECIAL, KeyBinds_Descriptions, KeyBinds_Functions, strcat(), strlen(), and substring().
Referenced by XonoticKeyBinder_keyDown().
Definition at line 335 of file keybinder.qc.
References cvar_set(), and localcmd.
void KeyBinds_BuildList | ( | ) |
Definition at line 17 of file keybinder.qc.
References KEYBIND_HEADER, and KeyBinds_Count.
Referenced by XonoticKeyBinder_loadKeyBinds().
entity makeXonoticKeyBinder | ( | ) |
Definition at line 140 of file keybinder.qc.
Referenced by XonoticInputSettingsTab_fill().
Definition at line 147 of file keybinder.qc.
References argv(), cvar_set(), keynumtostring(), localcmd, stof(), and tokenize().
Referenced by XonoticKeyBinder_configureXonoticKeyBinder().
Definition at line 161 of file keybinder.qc.
References replace_bind().
Definition at line 263 of file keybinder.qc.
References KeyBinds_Count, KeyBinds_Descriptions, KeyBinds_Functions, MAX_KEYBINDS, and strfree.
Definition at line 343 of file keybinder.qc.
References KeyBinder_Bind_Change(), and NULL.
void XonoticKeyBinder_drawListBoxItem | ( | entity | me, |
int | i, | ||
vector | absSize, | ||
bool | isSelected, | ||
bool | isFocused | ||
) |
Definition at line 404 of file keybinder.qc.
References argv(), cvar(), cvar_string(), draw_CenterText(), draw_Fill(), draw_Text(), draw_TextShortenToWidth(), eX, eY, getFadedAlpha(), KEYBIND_IS_SPECIAL, KeyBinds_Descriptions, KeyBinds_Functions, keyGrabber, keynumtostring(), startsWith, stof(), strcat(), strlen(), substring(), tokenize(), translate_key(), and vector().
void XonoticKeyBinder_editUserbind | ( | entity | me, |
string | theName, | ||
string | theCommandPress, | ||
string | theCommandRelease | ||
) |
Definition at line 275 of file keybinder.qc.
References cvar_set(), KEYBIND_IS_SPECIAL, KeyBinds_Descriptions, KeyBinds_Functions, strcat(), strlen(), and substring().
Definition at line 379 of file keybinder.qc.
References K_BACKSPACE, K_DEL, K_ENTER, K_KP_DEL, K_KP_ENTER, K_MOUSE2, K_SPACE, KeyBinder_Bind_Change(), KeyBinder_Bind_Clear(), KeyBinder_Bind_Edit(), and SUPER.
Definition at line 216 of file keybinder.qc.
References argv(), cvar_set(), K_CAPSLOCK, K_ESCAPE, K_NUMLOCK, KEY_NOT_BOUND_CMD, KEYBIND_IS_SPECIAL, KeyBinder_Bind_Change(), KeyBinds_Functions, keynumtostring(), localcmd, m_play_click_sound(), MAX_KEYS_PER_FUNCTION, MENU_SOUND_SELECT, stof(), and tokenize().
Definition at line 178 of file keybinder.qc.
References KeyBinds_BuildList(), and KeyBinds_Count.
void XonoticKeyBinder_resizeNotify | ( | entity | me, |
vector | relOrigin, | ||
vector | relSize, | ||
vector | absOrigin, | ||
vector | absSize | ||
) |
Definition at line 347 of file keybinder.qc.
References bound(), floor(), KEYBIND_IS_SPECIAL, KeyBinds_Descriptions, KeyBinds_Functions, substring(), and SUPER.
Definition at line 188 of file keybinder.qc.
int flags |
Definition at line 4 of file keybinder.qc.
Definition at line 9 of file keybinder.qc.
Referenced by KeyBinder_Bind_Clear(), and XonoticKeyBinder_keyGrabbed().
int KeyBinds_Count = -1 |
Definition at line 15 of file keybinder.qc.
Referenced by KeyBinds_BuildList(), XonoticKeyBinder_destroy(), and XonoticKeyBinder_loadKeyBinds().
string KeyBinds_Descriptions[MAX_KEYBINDS] |
Definition at line 14 of file keybinder.qc.
Referenced by KeyBinder_Bind_Edit(), XonoticKeyBinder_destroy(), XonoticKeyBinder_drawListBoxItem(), XonoticKeyBinder_editUserbind(), and XonoticKeyBinder_setSelected().
string KeyBinds_Functions[MAX_KEYBINDS] |
Definition at line 13 of file keybinder.qc.
Referenced by KeyBinder_Bind_Change(), KeyBinder_Bind_Clear(), KeyBinder_Bind_Edit(), XonoticKeyBinder_destroy(), XonoticKeyBinder_drawListBoxItem(), XonoticKeyBinder_editUserbind(), XonoticKeyBinder_keyGrabbed(), and XonoticKeyBinder_setSelected().
const int MAX_KEYBINDS = 256 |
Definition at line 12 of file keybinder.qc.
Referenced by XonoticKeyBinder_destroy().
const int MAX_KEYS_PER_FUNCTION = 2 |
Definition at line 11 of file keybinder.qc.
Referenced by XonoticKeyBinder_keyGrabbed().