4#ifndef TRAM_SDK_FRAMEWORK_UI_H
5#define TRAM_SDK_FRAMEWORK_UI_H
16 KEY_0,
KEY_1,
KEY_2,
KEY_3,
KEY_4,
KEY_5,
KEY_6,
KEY_7,
KEY_8,
KEY_9,
22 KEY_A,
KEY_B,
KEY_C,
KEY_D,
KEY_E,
KEY_F,
KEY_G,
KEY_H,
KEY_I,
KEY_J,
KEY_K,
KEY_L,
KEY_M,
23 KEY_N,
KEY_O,
KEY_P,
KEY_Q,
KEY_R,
KEY_S,
KEY_T,
KEY_U,
KEY_V,
KEY_W,
KEY_X,
KEY_Y,
KEY_Z,
143void KeyMouse(
float x_value,
float y_value);
keyboardaction_t RegisterKeyboardAction(const char *name)
Definition: ui.cpp:361
keyboardaction_t GetKeyboardAction(name_t name)
Definition: ui.cpp:366
const float CAMERA_SENSITIVITY
Definition: ui.h:108
float GetAxisSensitivity(KeyboardAxis key)
Definition: ui.cpp:272
void EndFrame()
Definition: ui.cpp:164
void Init()
Definition: ui.cpp:107
float PollKeyboardAxis(KeyboardAxis key)
Checks the state of an axis for the current frame.
Definition: ui.cpp:262
void SetWindowTitle(const char *title)
Definition: ui.cpp:185
void SetWindowSize(int w, int h)
Definition: ui.cpp:190
void KeyRelease(KeyboardKey key)
Definition: ui.cpp:294
void Uninit()
Definition: ui.cpp:115
float PollKeyboardAxisDelta(KeyboardAxis key)
Checks the change of an axis for since the last frame.
Definition: ui.cpp:268
bool ShouldExit()
Definition: ui.cpp:337
KeyboardAction
Definition: ui.h:85
@ KEY_ACTION_RIGHT
Definition: ui.h:98
@ KEY_ACTION_ACTIVATE
Definition: ui.h:94
@ KEY_ACTION_UP
Definition: ui.h:95
@ KEY_ACTION_NONE
Definition: ui.h:86
@ KEY_ACTION_FORWARD
Definition: ui.h:87
@ KEY_ACTION_STRAFE_RIGHT
Definition: ui.h:90
@ KEY_ACTION_STRAFE_LEFT
Definition: ui.h:89
@ KEY_ACTION_DOWN
Definition: ui.h:96
@ KEY_ACTION_BACKWARD
Definition: ui.h:88
@ KEY_ACTION_SPRINT
Definition: ui.h:93
@ KEY_ACTION_CROUCH
Definition: ui.h:92
@ KEY_ACTION_JUMP
Definition: ui.h:91
@ KEY_ACTION_LAST
Definition: ui.h:99
@ KEY_ACTION_LEFT
Definition: ui.h:97
void SetWebMainLoop(void(*loop_function)(void))
Definition: ui.cpp:168
InputState GetInputState()
Definition: ui.cpp:250
CursorType
Definition: ui.h:102
@ CURSOR_TEXT
Definition: ui.h:104
@ CURSOR_CLICK
Definition: ui.h:105
@ CURSOR_DEFAULT
Definition: ui.h:103
void KeyScroll(float value)
Definition: ui.cpp:323
const char * GetKeyboardKeyName(KeyboardKey key)
Definition: ui.cpp:416
void SetCursor(CursorType cursor)
Definition: ui.cpp:194
uint16_t keyboardaction_t
Definition: ui.h:83
float GetScreenWidth()
Definition: ui.cpp:177
bool PollKeyboardKey(KeyboardKey key)
Checks the state of a key for the current frame.
Definition: ui.cpp:256
void ScreenResize(int width, int height)
Definition: ui.cpp:327
void Update()
Definition: ui.cpp:119
std::vector< std::pair< keyboardaction_t, std::vector< KeyboardKey > > > GetAllKeyboardKeyBindings()
Definition: ui.cpp:385
float GetScreenHeight()
Definition: ui.cpp:181
void KeyMouse(float xpos, float ypos)
Definition: ui.cpp:308
void BindKeyboardKey(KeyboardKey key, keyboardaction_t action)
Definition: ui.cpp:88
KeyboardAxis
Definition: ui.h:68
@ KEY_MOUSE_X
Definition: ui.h:69
@ KEY_MOUSE_SCROLL
Definition: ui.h:71
@ KEY_MOUSE_Y
Definition: ui.h:70
@ KEY_LASTAXIS
Definition: ui.h:72
void SetAxisSensitivity(KeyboardAxis key, float value)
Definition: ui.cpp:276
void SetInputState(InputState state)
Definition: ui.cpp:214
void KeyCode(uint16_t code)
Definition: ui.cpp:304
void ScreenClose()
Definition: ui.cpp:333
KeyboardKey
Definition: ui.h:11
@ KEY_LEFT_SUPER
Definition: ui.h:54
@ KEY_F14
Definition: ui.h:44
@ KEY_SPACE
Definition: ui.h:13
@ KEY_BACKSPACE
Definition: ui.h:32
@ KEY_5
Definition: ui.h:16
@ KEY_KP_6
Definition: ui.h:47
@ KEY_6
Definition: ui.h:16
@ KEY_F8
Definition: ui.h:43
@ KEY_RIGHT_SUPER
Definition: ui.h:55
@ KEY_KP_0
Definition: ui.h:46
@ KEY_LEFT_CONTROL
Definition: ui.h:54
@ KEY_P
Definition: ui.h:23
@ KEY_DELETE
Definition: ui.h:32
@ KEY_WORLD_2
Definition: ui.h:29
@ KEY_KP_MULTIPLY
Definition: ui.h:50
@ KEY_KP_4
Definition: ui.h:46
@ KEY_LEFT
Definition: ui.h:35
@ KEY_F19
Definition: ui.h:44
@ KEY_KP_5
Definition: ui.h:46
@ KEY_Q
Definition: ui.h:23
@ KEY_LEFT_ALT
Definition: ui.h:54
@ KEY_I
Definition: ui.h:22
@ KEY_F13
Definition: ui.h:43
@ KEY_PAGE_DOWN
Definition: ui.h:38
@ KEY_KP_3
Definition: ui.h:46
@ KEY_F9
Definition: ui.h:43
@ KEY_K
Definition: ui.h:22
@ KEY_F4
Definition: ui.h:42
@ KEY_V
Definition: ui.h:23
@ KEY_KP_1
Definition: ui.h:46
@ KEY_KP_2
Definition: ui.h:46
@ KEY_KP_DECIMAL
Definition: ui.h:50
@ KEY_HOME
Definition: ui.h:38
@ KEY_E
Definition: ui.h:22
@ KEY_END
Definition: ui.h:38
@ KEY_KP_ENTER
Definition: ui.h:51
@ KEY_L
Definition: ui.h:22
@ KEY_M
Definition: ui.h:22
@ KEY_DOWN
Definition: ui.h:35
@ KEY_F18
Definition: ui.h:44
@ KEY_KP_SUBTRACT
Definition: ui.h:50
@ KEY_9
Definition: ui.h:16
@ KEY_Z
Definition: ui.h:23
@ KEY_F5
Definition: ui.h:42
@ KEY_RIGHTMOUSE
Definition: ui.h:61
@ KEY_F2
Definition: ui.h:42
@ KEY_O
Definition: ui.h:23
@ KEY_0
Definition: ui.h:16
@ KEY_PRINT_SCREEN
Definition: ui.h:39
@ KEY_LEFT_SHIFT
Definition: ui.h:54
@ KEY_G
Definition: ui.h:22
@ KEY_A
Definition: ui.h:22
@ KEY_RIGHT_SHIFT
Definition: ui.h:55
@ KEY_S
Definition: ui.h:23
@ KEY_ENTER
Definition: ui.h:32
@ KEY_COMMA
Definition: ui.h:13
@ KEY_MINUS
Definition: ui.h:13
@ KEY_F6
Definition: ui.h:42
@ KEY_APOSTROPHE
Definition: ui.h:13
@ KEY_SEMICOLON
Definition: ui.h:19
@ KEY_KP_8
Definition: ui.h:47
@ KEY_7
Definition: ui.h:16
@ KEY_KP_DIVIDE
Definition: ui.h:50
@ KEY_F17
Definition: ui.h:44
@ KEY_F11
Definition: ui.h:43
@ KEY_KP_ADD
Definition: ui.h:50
@ KEY_NUM_LOCK
Definition: ui.h:39
@ KEY_WORLD_1
Definition: ui.h:29
@ KEY_F22
Definition: ui.h:45
@ KEY_SLASH
Definition: ui.h:13
@ KEY_TAB
Definition: ui.h:32
@ KEY_N
Definition: ui.h:23
@ KEY_F20
Definition: ui.h:45
@ KEY_F23
Definition: ui.h:45
@ KEY_X
Definition: ui.h:23
@ KEY_PAGE_UP
Definition: ui.h:38
@ KEY_F12
Definition: ui.h:43
@ KEY_INSERT
Definition: ui.h:32
@ KEY_RIGHT
Definition: ui.h:35
@ KEY_LEFTMOUSE
Definition: ui.h:62
@ KEY_2
Definition: ui.h:16
@ KEY_8
Definition: ui.h:16
@ KEY_4
Definition: ui.h:16
@ KEY_F24
Definition: ui.h:45
@ KEY_KP_EQUAL
Definition: ui.h:51
@ KEY_B
Definition: ui.h:22
@ KEY_SCROLL_LOCK
Definition: ui.h:39
@ KEY_J
Definition: ui.h:22
@ KEY_F16
Definition: ui.h:44
@ KEY_ESCAPE
Definition: ui.h:32
@ KEY_F25
Definition: ui.h:45
@ KEY_UP
Definition: ui.h:35
@ KEY_MENU
Definition: ui.h:58
@ KEY_GRAVE_ACCENT
Definition: ui.h:26
@ KEY_F21
Definition: ui.h:45
@ KEY_F3
Definition: ui.h:42
@ KEY_PERIOD
Definition: ui.h:13
@ KEY_Y
Definition: ui.h:23
@ KEY_F
Definition: ui.h:22
@ KEY_D
Definition: ui.h:22
@ KEY_3
Definition: ui.h:16
@ KEY_BACKSLASH
Definition: ui.h:26
@ KEY_C
Definition: ui.h:22
@ KEY_LEFT_BRACKET
Definition: ui.h:26
@ KEY_R
Definition: ui.h:23
@ KEY_T
Definition: ui.h:23
@ KEY_U
Definition: ui.h:23
@ KEY_KP_7
Definition: ui.h:47
@ KEY_F1
Definition: ui.h:42
@ KEY_CAPS_LOCK
Definition: ui.h:39
@ KEY_F7
Definition: ui.h:43
@ KEY_RIGHT_BRACKET
Definition: ui.h:26
@ KEY_KP_9
Definition: ui.h:47
@ KEY_1
Definition: ui.h:16
@ KEY_EQUAL
Definition: ui.h:19
@ KEY_RIGHT_CONTROL
Definition: ui.h:55
@ KEY_F15
Definition: ui.h:44
@ KEY_H
Definition: ui.h:22
@ KEY_PAUSE
Definition: ui.h:39
@ KEY_W
Definition: ui.h:23
@ KEY_LASTKEY
Definition: ui.h:65
@ KEY_MIDDLEMOUSE
Definition: ui.h:63
@ KEY_RIGHT_ALT
Definition: ui.h:55
@ KEY_F10
Definition: ui.h:43
const float CAMERA_SPEED
Definition: ui.h:109
void KeyPress(KeyboardKey key)
Definition: ui.cpp:280
name_t GetKeyboardActionName(keyboardaction_t type)
Definition: ui.cpp:381
InputState
Definition: ui.h:75
@ STATE_NO_INPUT
Definition: ui.h:77
@ STATE_CURSOR
Definition: ui.h:80
@ STATE_FLYING
Definition: ui.h:78
@ STATE_DEFAULT
Definition: ui.h:76
@ STATE_MENU_OPEN
Definition: ui.h:79