|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#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 | KEYBIND_DEF(func, desc) |
| #define | KEYBIND_DEF_OVERRIDER_WITH_ICON(func, desc, icon) |
| #define | KEYBIND_DEF_SPECIAL_WITH_ICON(func, desc, icon) |
| #define | KEYBIND_DEF_WITH_ICON(func, desc, icon) |
| #define | KEYBIND_EMPTY_LINE() |
| #define | KEYBIND_HEADER(str) |
| #define | KEYBIND_IS_OVERRIDER(func) |
| #define | KEYBIND_IS_SPECIAL(func) |
| #define | KEYBIND_IS_UNSELECTABLE(idx) |
| #define | KEYBIND_IS_USERBIND(descr) |
| #define | SHOWABLE_WEAPON(w) |
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] |
| string | KeyBinds_Icons [MAX_KEYBINDS] |
| const int | MAX_KEYBINDS = 256 |
| const int | MAX_KEYS_PER_FUNCTION = 2 |
| string | XonoticKeyBinder_cb_icon |
| string | XonoticKeyBinder_cb_name |
| #define KEYBIND_DEF | ( | func, | |
| desc ) |
Referenced by KeyBinds_BuildList().
| #define KEYBIND_DEF_OVERRIDER_WITH_ICON | ( | func, | |
| desc, | |||
| icon ) |
| #define KEYBIND_DEF_SPECIAL_WITH_ICON | ( | func, | |
| desc, | |||
| icon ) |
Referenced by KeyBinds_BuildList().
| #define KEYBIND_DEF_WITH_ICON | ( | func, | |
| desc, | |||
| icon ) |
Referenced by KeyBinds_BuildList().
| #define KEYBIND_EMPTY_LINE | ( | ) |
Referenced by KeyBinds_BuildList().
| #define KEYBIND_HEADER | ( | str | ) |
Referenced by KeyBinds_BuildList().
| #define KEYBIND_IS_OVERRIDER | ( | func | ) |
Definition at line 31 of file keybinder.qc.
Referenced by KeyBinder_Bind_Clear(), XonoticKeyBinder_drawListBoxItem(), and XonoticKeyBinder_keyGrabbed().
| #define KEYBIND_IS_SPECIAL | ( | func | ) |
Definition at line 27 of file keybinder.qc.
Referenced by KeyBinder_Bind_Change(), KeyBinder_Bind_Clear(), KeyBinder_Bind_Edit(), XonoticKeyBinder_drawListBoxItem(), XonoticKeyBinder_editUserbind(), and XonoticKeyBinder_keyGrabbed().
| #define KEYBIND_IS_UNSELECTABLE | ( | idx | ) |
Referenced by XonoticKeyBinder_setSelected().
| #define KEYBIND_IS_USERBIND | ( | descr | ) |
Definition at line 23 of file keybinder.qc.
Referenced by KeyBinder_Bind_Edit(), XonoticKeyBinder_drawListBoxItem(), XonoticKeyBinder_editUserbind(), and XonoticKeyBinder_setSelected().
| #define SHOWABLE_WEAPON | ( | w | ) |
Referenced by KeyBinds_BuildList().
Definition at line 259 of file keybinder.qc.
References entity(), KEYBIND_IS_SPECIAL, KeyBinds_Functions, and keyGrabber.
Referenced by XonoticKeyBinder::editUserbind(), XonoticInputSettingsTab_fill(), XonoticKeyBinder_doubleClickListBoxItem(), XonoticKeyBinder_keyDown(), and XonoticKeyBinder_keyGrabbed().
Definition at line 389 of file keybinder.qc.
References argv(), cvar_set(), entity(), KEYBIND_IS_OVERRIDER, KEYBIND_IS_SPECIAL, KeyBinder_Bind_UnbindAllForFunction(), KeyBinds_Functions, localcmd(), m_play_click_sound(), MENU_SOUND_CLEAR, tokenize(), and tokenizebyseparator.
Referenced by XonoticKeyBinder::editUserbind(), XonoticInputSettingsTab_fill(), and XonoticKeyBinder_keyDown().
Definition at line 368 of file keybinder.qc.
References cvar_string(), DialogOpenButton_Click(), entity(), KEYBIND_IS_SPECIAL, KEYBIND_IS_USERBIND, KeyBinds_Descriptions, KeyBinds_Functions, strcat(), strlen, and substring().
Referenced by XonoticKeyBinder::editUserbind(), XonoticInputSettingsTab_fill(), and XonoticKeyBinder_keyDown().
Definition at line 413 of file keybinder.qc.
References cvar_set(), entity(), and localcmd().
Referenced by XonoticKeyBinder::editUserbind(), and XonoticBindingsResetDialog_fill().
Definition at line 270 of file keybinder.qc.
References argv(), KEY_NOT_BOUND_CMD, keynumtostring(), localcmd(), and stof().
Referenced by KeyBinder_Bind_Clear(), and XonoticKeyBinder_keyGrabbed().
| void KeyBinds_BuildList | ( | ) |
Definition at line 40 of file keybinder.qc.
References CTX(), FOREACH, imp, itos, KEYBIND_DEF, KEYBIND_DEF_SPECIAL_WITH_ICON, KEYBIND_DEF_WITH_ICON, KEYBIND_EMPTY_LINE, KEYBIND_HEADER, KeyBinds_Count, SHOWABLE_WEAPON, strcat(), translate_key(), Weapons, XonoticKeyBinder_cb(), XonoticKeyBinder_cb_icon, and XonoticKeyBinder_cb_name.
Referenced by XonoticKeyBinder_loadKeyBinds().
| entity makeXonoticKeyBinder | ( | ) |
Definition at line 196 of file keybinder.qc.
Referenced by XonoticKeyBinder::editUserbind(), and XonoticInputSettingsTab_fill().
Definition at line 203 of file keybinder.qc.
References argv(), cvar_set(), keynumtostring(), localcmd(), stof(), and tokenize().
Definition at line 34 of file keybinder.qc.
References XonoticKeyBinder_cb_icon, and XonoticKeyBinder_cb_name.
Referenced by KeyBinds_BuildList(), and XonoticKeyBinder_resizeNotify().
Definition at line 217 of file keybinder.qc.
References entity().
Definition at line 336 of file keybinder.qc.
References entity(), KeyBinds_Count, KeyBinds_Descriptions, KeyBinds_Functions, KeyBinds_Icons, MAX_KEYBINDS, and strfree.
Definition at line 421 of file keybinder.qc.
References entity(), KeyBinder_Bind_Change(), NULL, and vector.
| void XonoticKeyBinder_drawListBoxItem | ( | entity | me, |
| int | i, | ||
| vector | absSize, | ||
| bool | isSelected, | ||
| bool | isFocused ) |
Definition at line 481 of file keybinder.qc.
References argv(), cons_mid(), cvar(), cvar_string(), draw_CenterText(), draw_Fill(), draw_Picture(), draw_Text(), draw_TextShortenToWidth(), entity(), eX, eY, getFadedAlpha(), KEYBIND_IS_OVERRIDER, KEYBIND_IS_SPECIAL, KEYBIND_IS_USERBIND, KeyBinds_Descriptions, KeyBinds_Functions, KeyBinds_Icons, keyGrabber, keynumtostring(), startsWith, stof(), strcat(), strlen, substring(), tokenize(), tokenizebyseparator, translate_key(), and vector.
| void XonoticKeyBinder_editUserbind | ( | entity | me, |
| string | theName, | ||
| string | theCommandPress, | ||
| string | theCommandRelease ) |
Definition at line 349 of file keybinder.qc.
References cvar_set(), entity(), KEYBIND_IS_SPECIAL, KEYBIND_IS_USERBIND, KeyBinds_Descriptions, KeyBinds_Functions, strcat(), strlen, and substring().
Definition at line 456 of file keybinder.qc.
References entity(), 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 285 of file keybinder.qc.
References argv(), cvar_set(), entity(), K_CAPSLOCK, K_ESCAPE, K_NUMLOCK, KEYBIND_IS_OVERRIDER, KEYBIND_IS_SPECIAL, KeyBinder_Bind_Change(), KeyBinder_Bind_UnbindAllForFunction(), KeyBinds_Functions, keynumtostring(), localcmd(), m_play_click_sound(), MAX_KEYS_PER_FUNCTION, MENU_SOUND_SELECT, stof(), tokenize(), and tokenizebyseparator.
Definition at line 222 of file keybinder.qc.
References entity(), KeyBinds_BuildList(), and KeyBinds_Count.
| void XonoticKeyBinder_resizeNotify | ( | entity | me, |
| vector | relOrigin, | ||
| vector | relSize, | ||
| vector | absOrigin, | ||
| vector | absSize ) |
Definition at line 237 of file keybinder.qc.
References draw_PictureSize(), entity(), REGISTRY_GET, SUPER, vector, Weapons, WEP_FIRST, XonoticKeyBinder_cb(), and XonoticKeyBinder_cb_icon.
Definition at line 425 of file keybinder.qc.
References bound(), entity(), KEYBIND_IS_UNSELECTABLE, KEYBIND_IS_USERBIND, KeyBinds_Descriptions, and SUPER.
Definition at line 232 of file keybinder.qc.
References entity().
| int flags |
Definition at line 4 of file keybinder.qc.
| const string KEY_NOT_BOUND_CMD = "// not bound" |
Definition at line 9 of file keybinder.qc.
Referenced by KeyBinder_Bind_UnbindAllForFunction().
| int KeyBinds_Count = -1 |
Definition at line 13 of file keybinder.qc.
Referenced by KeyBinds_BuildList(), XonoticKeyBinder_destroy(), and XonoticKeyBinder_loadKeyBinds().
| string KeyBinds_Descriptions[MAX_KEYBINDS] |
Definition at line 17 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 14 of file keybinder.qc.
Referenced by KeyBinder_Bind_Change(), KeyBinder_Bind_Clear(), KeyBinder_Bind_Edit(), XonoticKeyBinder_destroy(), XonoticKeyBinder_drawListBoxItem(), XonoticKeyBinder_editUserbind(), and XonoticKeyBinder_keyGrabbed().
| string KeyBinds_Icons[MAX_KEYBINDS] |
Definition at line 19 of file keybinder.qc.
Referenced by XonoticKeyBinder_destroy(), and XonoticKeyBinder_drawListBoxItem().
| 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().
| string XonoticKeyBinder_cb_icon |
Definition at line 33 of file keybinder.qc.
Referenced by KeyBinds_BuildList(), XonoticKeyBinder_cb(), and XonoticKeyBinder_resizeNotify().
| string XonoticKeyBinder_cb_name |
Definition at line 33 of file keybinder.qc.
Referenced by KeyBinds_BuildList(), and XonoticKeyBinder_cb().