abstract input into platform layer
This commit is contained in:
@@ -14,11 +14,9 @@ void ui_widgets_init() {
|
||||
g_wstate = {};
|
||||
}
|
||||
|
||||
void ui_widgets_begin_frame(PlatformInputEvents input, B32 mouse_down, B32 was_mouse_down) {
|
||||
void ui_widgets_begin_frame(PlatformInput input) {
|
||||
g_wstate.input = input;
|
||||
g_wstate.was_mouse_down = g_wstate.mouse_down;
|
||||
g_wstate.mouse_down = mouse_down;
|
||||
g_wstate.mouse_clicked = (mouse_down && !g_wstate.was_mouse_down);
|
||||
g_wstate.mouse_clicked = (input.mouse_down && !input.was_mouse_down);
|
||||
g_wstate.cursor_blink += 1.0f / 60.0f;
|
||||
g_wstate.text_input_count = 0;
|
||||
g_wstate.tab_pressed = 0;
|
||||
|
||||
Reference in New Issue
Block a user