rntviewer/src/window.h
2024-07-16 17:58:01 +02:00

33 lines
450 B
C

enum Input_Key {
KEY_UP,
KEY_DOWN,
KEY_LEFT,
KEY_RIGHT,
KEY_Q,
KEY_ALT,
KEY_TAB,
KEY_COUNT
};
enum Key_State : u8 {
KEY_STATE_IS_DOWN = 0x1,
KEY_STATE_JUST_PRESSED = 0x2,
KEY_STATE_JUST_RELEASED = 0x4,
};
struct User_Input {
u8 key_state[KEY_COUNT];
struct { i32 x; i32 y; } mouse_pos;
};
struct Window_Data {
// Real width and height of the window
i32 width;
i32 height;
bool size_just_changed;
f32 desired_aspect_ratio;
};