ref: 0e3422d345124535296317815d84b6516d782af7
parent: 6c85526fcd08fcff8c530120fe437c4193cd6308
author: Dominic Szablewski <dominic@phoboslab.org>
date: Tue Aug 15 19:20:23 EDT 2023
Rename buttons for presentation in menu
--- a/src/input.c
+++ b/src/input.c
@@ -8,32 +8,32 @@
NULL,
NULL,
NULL,
- [INPUT_KEY_A] = "a",
- [INPUT_KEY_B] = "b",
- [INPUT_KEY_C] = "c",
- [INPUT_KEY_D] = "d",
- [INPUT_KEY_E] = "e",
- [INPUT_KEY_F] = "f",
- [INPUT_KEY_G] = "g",
- [INPUT_KEY_H] = "h",
- [INPUT_KEY_I] = "i",
- [INPUT_KEY_J] = "j",
- [INPUT_KEY_K] = "k",
- [INPUT_KEY_L] = "l",
- [INPUT_KEY_M] = "m",
- [INPUT_KEY_N] = "n",
- [INPUT_KEY_O] = "o",
- [INPUT_KEY_P] = "p",
- [INPUT_KEY_Q] = "q",
- [INPUT_KEY_R] = "r",
- [INPUT_KEY_S] = "s",
- [INPUT_KEY_T] = "t",
- [INPUT_KEY_U] = "u",
- [INPUT_KEY_V] = "v",
- [INPUT_KEY_W] = "w",
- [INPUT_KEY_X] = "x",
- [INPUT_KEY_Y] = "y",
- [INPUT_KEY_Z] = "z",
+ [INPUT_KEY_A] = "A",
+ [INPUT_KEY_B] = "B",
+ [INPUT_KEY_C] = "C",
+ [INPUT_KEY_D] = "D",
+ [INPUT_KEY_E] = "E",
+ [INPUT_KEY_F] = "F",
+ [INPUT_KEY_G] = "G",
+ [INPUT_KEY_H] = "H",
+ [INPUT_KEY_I] = "I",
+ [INPUT_KEY_J] = "J",
+ [INPUT_KEY_K] = "K",
+ [INPUT_KEY_L] = "L",
+ [INPUT_KEY_M] = "M",
+ [INPUT_KEY_N] = "N",
+ [INPUT_KEY_O] = "O",
+ [INPUT_KEY_P] = "P",
+ [INPUT_KEY_Q] = "Q",
+ [INPUT_KEY_R] = "R",
+ [INPUT_KEY_S] = "S",
+ [INPUT_KEY_T] = "T",
+ [INPUT_KEY_U] = "U",
+ [INPUT_KEY_V] = "V",
+ [INPUT_KEY_W] = "W",
+ [INPUT_KEY_X] = "X",
+ [INPUT_KEY_Y] = "Y",
+ [INPUT_KEY_Z] = "Z",
[INPUT_KEY_1] = "1",
[INPUT_KEY_2] = "2",
[INPUT_KEY_3] = "3",
@@ -44,106 +44,106 @@
[INPUT_KEY_8] = "8",
[INPUT_KEY_9] = "9",
[INPUT_KEY_0] = "0",
- [INPUT_KEY_RETURN] = "return",
- [INPUT_KEY_ESCAPE] = "escape",
- [INPUT_KEY_BACKSPACE] = "backspace",
- [INPUT_KEY_TAB] = "tab",
- [INPUT_KEY_SPACE] = "space",
- [INPUT_KEY_MINUS] = "minus",
- [INPUT_KEY_EQUALS] = "equals",
- [INPUT_KEY_LEFTBRACKET] = "left_bracket",
- [INPUT_KEY_RIGHTBRACKET] = "right_bracket",
- [INPUT_KEY_BACKSLASH] = "backslash",
- [INPUT_KEY_HASH] = "hash",
- [INPUT_KEY_SEMICOLON] = "semicolon",
- [INPUT_KEY_APOSTROPHE] = "apostrophe",
- [INPUT_KEY_TILDE] = "tilde",
- [INPUT_KEY_COMMA] = "comma",
- [INPUT_KEY_PERIOD] = "period",
- [INPUT_KEY_SLASH] = "slash",
- [INPUT_KEY_CAPSLOCK] = "capslock",
- [INPUT_KEY_F1] = "f1",
- [INPUT_KEY_F2] = "f2",
- [INPUT_KEY_F3] = "f3",
- [INPUT_KEY_F4] = "f4",
- [INPUT_KEY_F5] = "f5",
- [INPUT_KEY_F6] = "f6",
- [INPUT_KEY_F7] = "f7",
- [INPUT_KEY_F8] = "f8",
- [INPUT_KEY_F9] = "f9",
- [INPUT_KEY_F10] = "f10",
- [INPUT_KEY_F11] = "f11",
- [INPUT_KEY_F12] = "f12",
- [INPUT_KEY_PRINTSCREEN] = "print_screen",
- [INPUT_KEY_SCROLLLOCK] = "scroll_lock",
- [INPUT_KEY_PAUSE] = "pause",
- [INPUT_KEY_INSERT] = "insert",
- [INPUT_KEY_HOME] = "home",
- [INPUT_KEY_PAGEUP] = "page_up",
- [INPUT_KEY_DELETE] = "delete",
- [INPUT_KEY_END] = "end",
- [INPUT_KEY_PAGEDOWN] = "page_down",
- [INPUT_KEY_RIGHT] = "right",
- [INPUT_KEY_LEFT] = "left",
- [INPUT_KEY_DOWN] = "down",
- [INPUT_KEY_UP] = "up",
- [INPUT_KEY_NUMLOCK] = "num_lock",
- [INPUT_KEY_KP_DIVIDE] = "keypad_divide",
- [INPUT_KEY_KP_MULTIPLY] = "keypad_multiply",
- [INPUT_KEY_KP_MINUS] = "keypad_minus",
- [INPUT_KEY_KP_PLUS] = "keypad_plus",
- [INPUT_KEY_KP_ENTER] = "keypad_enter",
- [INPUT_KEY_KP_1] = "keypad_1",
- [INPUT_KEY_KP_2] = "keypad_2",
- [INPUT_KEY_KP_3] = "keypad_3",
- [INPUT_KEY_KP_4] = "keypad_4",
- [INPUT_KEY_KP_5] = "keypad_5",
- [INPUT_KEY_KP_6] = "keypad_6",
- [INPUT_KEY_KP_7] = "keypad_7",
- [INPUT_KEY_KP_8] = "keypad_8",
- [INPUT_KEY_KP_9] = "keypad_9",
- [INPUT_KEY_KP_0] = "keypad_0",
- [INPUT_KEY_KP_PERIOD] = "keypad_period",
+ [INPUT_KEY_RETURN] = "RETURN",
+ [INPUT_KEY_ESCAPE] = "ESCAPE",
+ [INPUT_KEY_BACKSPACE] = "BACKSP",
+ [INPUT_KEY_TAB] = "TAB",
+ [INPUT_KEY_SPACE] = "SPACE",
+ [INPUT_KEY_MINUS] = "MINUS",
+ [INPUT_KEY_EQUALS] = "EQUALS",
+ [INPUT_KEY_LEFTBRACKET] = "LBRACKET",
+ [INPUT_KEY_RIGHTBRACKET] = "RBRACKET",
+ [INPUT_KEY_BACKSLASH] = "BSLASH",
+ [INPUT_KEY_HASH] = "HASH",
+ [INPUT_KEY_SEMICOLON] = "SMICOL",
+ [INPUT_KEY_APOSTROPHE] = "APO",
+ [INPUT_KEY_TILDE] = "TILDE",
+ [INPUT_KEY_COMMA] = "COMMA",
+ [INPUT_KEY_PERIOD] = "PERIOD",
+ [INPUT_KEY_SLASH] = "SLASH",
+ [INPUT_KEY_CAPSLOCK] = "CAPS",
+ [INPUT_KEY_F1] = "F1",
+ [INPUT_KEY_F2] = "F2",
+ [INPUT_KEY_F3] = "F3",
+ [INPUT_KEY_F4] = "F4",
+ [INPUT_KEY_F5] = "F5",
+ [INPUT_KEY_F6] = "F6",
+ [INPUT_KEY_F7] = "F7",
+ [INPUT_KEY_F8] = "F8",
+ [INPUT_KEY_F9] = "F9",
+ [INPUT_KEY_F10] = "F10",
+ [INPUT_KEY_F11] = "F11",
+ [INPUT_KEY_F12] = "F12",
+ [INPUT_KEY_PRINTSCREEN] = "PRTSC",
+ [INPUT_KEY_SCROLLLOCK] = "SCRLK",
+ [INPUT_KEY_PAUSE] = "PAUSE",
+ [INPUT_KEY_INSERT] = "INSERT",
+ [INPUT_KEY_HOME] = "HOME",
+ [INPUT_KEY_PAGEUP] = "PG UP",
+ [INPUT_KEY_DELETE] = "DELETE",
+ [INPUT_KEY_END] = "END",
+ [INPUT_KEY_PAGEDOWN] = "PG DOWN",
+ [INPUT_KEY_RIGHT] = "RIGHT",
+ [INPUT_KEY_LEFT] = "LEFT",
+ [INPUT_KEY_DOWN] = "DOWN",
+ [INPUT_KEY_UP] = "UP",
+ [INPUT_KEY_NUMLOCK] = "NLOCK",
+ [INPUT_KEY_KP_DIVIDE] = "KPDIV",
+ [INPUT_KEY_KP_MULTIPLY] = "KPMUL",
+ [INPUT_KEY_KP_MINUS] = "KPMINUS",
+ [INPUT_KEY_KP_PLUS] = "KPPLUS",
+ [INPUT_KEY_KP_ENTER] = "KPENTER",
+ [INPUT_KEY_KP_1] = "KP1",
+ [INPUT_KEY_KP_2] = "KP2",
+ [INPUT_KEY_KP_3] = "KP3",
+ [INPUT_KEY_KP_4] = "KP4",
+ [INPUT_KEY_KP_5] = "KP5",
+ [INPUT_KEY_KP_6] = "KP6",
+ [INPUT_KEY_KP_7] = "KP7",
+ [INPUT_KEY_KP_8] = "KP8",
+ [INPUT_KEY_KP_9] = "KP9",
+ [INPUT_KEY_KP_0] = "KP0",
+ [INPUT_KEY_KP_PERIOD] = "KPPERIOD",
- [INPUT_KEY_LCTRL] = "left_ctrl",
- [INPUT_KEY_LSHIFT] = "left_shift",
- [INPUT_KEY_LALT] = "left_alt",
- [INPUT_KEY_LGUI] = "left_gui",
- [INPUT_KEY_RCTRL] = "right_ctrl",
- [INPUT_KEY_RSHIFT] = "right_shift",
- [INPUT_KEY_RALT] = "right_alt",
+ [INPUT_KEY_LCTRL] = "LCTRL",
+ [INPUT_KEY_LSHIFT] = "LSHIFT",
+ [INPUT_KEY_LALT] = "LALT",
+ [INPUT_KEY_LGUI] = "LGUI",
+ [INPUT_KEY_RCTRL] = "RCTRL",
+ [INPUT_KEY_RSHIFT] = "RSHIFT",
+ [INPUT_KEY_RALT] = "RALT",
NULL,
- [INPUT_GAMEPAD_A] = "gamepad_a",
- [INPUT_GAMEPAD_Y] = "gamepad_y",
- [INPUT_GAMEPAD_B] = "gamepad_b",
- [INPUT_GAMEPAD_X] = "gamepad_x",
- [INPUT_GAMEPAD_L_SHOULDER] = "gamepad_left_shoulder",
- [INPUT_GAMEPAD_R_SHOULDER] = "gamepad_right_shoulder",
- [INPUT_GAMEPAD_L_TRIGGER] = "gamepad_left_trigger",
- [INPUT_GAMEPAD_R_TRIGGER] = "gamepad_right_trigger",
- [INPUT_GAMEPAD_SELECT] = "gamepad_select",
- [INPUT_GAMEPAD_START] = "gamepad_start",
- [INPUT_GAMEPAD_L_STICK_PRESS] = "gamepad_left_stick_press",
- [INPUT_GAMEPAD_R_STICK_PRESS] = "gamepad_right_stick_press",
- [INPUT_GAMEPAD_DPAD_UP] = "gamepad_dpad_up",
- [INPUT_GAMEPAD_DPAD_DOWN] = "gamepad_dpad_down",
- [INPUT_GAMEPAD_DPAD_LEFT] = "gamepad_dpad_left",
- [INPUT_GAMEPAD_DPAD_RIGHT] = "gamepad_dpad_right",
- [INPUT_GAMEPAD_HOME] = "gamepad_home",
- [INPUT_GAMEPAD_L_STICK_UP] = "gamepad_left_stick_up",
- [INPUT_GAMEPAD_L_STICK_DOWN] = "gamepad_left_stick_down",
- [INPUT_GAMEPAD_L_STICK_LEFT] = "gamepad_left_stick_left",
- [INPUT_GAMEPAD_L_STICK_RIGHT] = "gamepad_left_stick_right",
- [INPUT_GAMEPAD_R_STICK_UP] = "gamepad_right_stick_up",
- [INPUT_GAMEPAD_R_STICK_DOWN] = "gamepad_right_stick_down",
- [INPUT_GAMEPAD_R_STICK_LEFT] = "gamepad_right_stick_left",
- [INPUT_GAMEPAD_R_STICK_RIGHT] = "gamepad_right_stick_right",
+ [INPUT_GAMEPAD_A] = "A",
+ [INPUT_GAMEPAD_Y] = "Y",
+ [INPUT_GAMEPAD_B] = "B",
+ [INPUT_GAMEPAD_X] = "X",
+ [INPUT_GAMEPAD_L_SHOULDER] = "LSHLDR",
+ [INPUT_GAMEPAD_R_SHOULDER] = "RSHLDR",
+ [INPUT_GAMEPAD_L_TRIGGER] = "LTRIG",
+ [INPUT_GAMEPAD_R_TRIGGER] = "RTRIG",
+ [INPUT_GAMEPAD_SELECT] = "SELECT",
+ [INPUT_GAMEPAD_START] = "START",
+ [INPUT_GAMEPAD_L_STICK_PRESS] = "LSTK",
+ [INPUT_GAMEPAD_R_STICK_PRESS] = "RSTK",
+ [INPUT_GAMEPAD_DPAD_UP] = "DPUP",
+ [INPUT_GAMEPAD_DPAD_DOWN] = "DPDOWN",
+ [INPUT_GAMEPAD_DPAD_LEFT] = "DPLEFT",
+ [INPUT_GAMEPAD_DPAD_RIGHT] = "DPRIGHT",
+ [INPUT_GAMEPAD_HOME] = "HOME",
+ [INPUT_GAMEPAD_L_STICK_UP] = "LSTKUP",
+ [INPUT_GAMEPAD_L_STICK_DOWN] = "LSTKDOWN",
+ [INPUT_GAMEPAD_L_STICK_LEFT] = "LSTKLEFT",
+ [INPUT_GAMEPAD_L_STICK_RIGHT] = "LSTKRIGHT",
+ [INPUT_GAMEPAD_R_STICK_UP] = "RSTKUP",
+ [INPUT_GAMEPAD_R_STICK_DOWN] = "RSTKDOWN",
+ [INPUT_GAMEPAD_R_STICK_LEFT] = "RSTKLEFT",
+ [INPUT_GAMEPAD_R_STICK_RIGHT] = "RSTKRIGHT",
NULL,
- [INPUT_MOUSE_LEFT] = "mouse_left",
- [INPUT_MOUSE_MIDDLE] = "mouse_middle",
- [INPUT_MOUSE_RIGHT] = "mouse_right",
- [INPUT_MOUSE_WHEEL_UP] = "mouse_wheel_up",
- [INPUT_MOUSE_WHEEL_DOWN] = "mouse_wheel_down",
+ [INPUT_MOUSE_LEFT] = "MLEFT",
+ [INPUT_MOUSE_MIDDLE] = "MMIDDLE",
+ [INPUT_MOUSE_RIGHT] = "MRIGHT",
+ [INPUT_MOUSE_WHEEL_UP] = "MWUP",
+ [INPUT_MOUSE_WHEEL_DOWN] = "MWDOWN",
};
static float actions_state[INPUT_ACTION_MAX];