mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-04 02:26:13 +00:00
Cleanups
This commit is contained in:
parent
a8d4bf6ec4
commit
b7785a36a3
@ -281,7 +281,7 @@ static void zui_finish(zui_t *zui,
|
||||
zui->rendering = false;
|
||||
}
|
||||
|
||||
static bool check_hit(zui_t *zui, int x1, int y1, int x2, int y2)
|
||||
static bool check_hitbox(zui_t *zui, int x1, int y1, int x2, int y2)
|
||||
{
|
||||
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
|
||||
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS);
|
||||
@ -292,7 +292,7 @@ static bool check_hit(zui_t *zui, int x1, int y1, int x2, int y2)
|
||||
static bool check_button_down(zui_t *zui, unsigned id, int x1, int y1, int x2, int y2)
|
||||
{
|
||||
bool result = false;
|
||||
bool inside = check_hit(zui, x1, y1, x2, y2);
|
||||
bool inside = check_hitbox(zui, x1, y1, x2, y2);
|
||||
|
||||
if (inside)
|
||||
zui->item.hot = id;
|
||||
@ -309,7 +309,7 @@ static bool check_button_down(zui_t *zui, unsigned id, int x1, int y1, int x2, i
|
||||
static bool check_button_up(zui_t *zui, unsigned id, int x1, int y1, int x2, int y2)
|
||||
{
|
||||
bool result = false;
|
||||
bool inside = check_hit(zui, x1, y1, x2, y2);
|
||||
bool inside = check_hitbox(zui, x1, y1, x2, y2);
|
||||
|
||||
if (inside)
|
||||
zui->item.hot = id;
|
||||
|
@ -75,6 +75,24 @@ struct menu_bind_state
|
||||
bool skip;
|
||||
};
|
||||
|
||||
typedef struct menu_input_mouse
|
||||
{
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
bool left;
|
||||
bool right;
|
||||
bool oldleft;
|
||||
bool oldright;
|
||||
bool wheelup;
|
||||
bool wheeldown;
|
||||
bool hwheelup;
|
||||
bool hwheeldown;
|
||||
bool scrollup;
|
||||
bool scrolldown;
|
||||
unsigned ptr;
|
||||
uint64_t state;
|
||||
} menu_input_mouse_t;
|
||||
|
||||
typedef struct menu_input
|
||||
{
|
||||
struct menu_bind_state binds;
|
||||
|
@ -102,24 +102,6 @@ enum menu_input_bind_mode
|
||||
MENU_INPUT_BIND_ALL
|
||||
};
|
||||
|
||||
typedef struct menu_input_mouse
|
||||
{
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
bool left;
|
||||
bool right;
|
||||
bool oldleft;
|
||||
bool oldright;
|
||||
bool wheelup;
|
||||
bool wheeldown;
|
||||
bool hwheelup;
|
||||
bool hwheeldown;
|
||||
bool scrollup;
|
||||
bool scrolldown;
|
||||
unsigned ptr;
|
||||
uint64_t state;
|
||||
} menu_input_mouse_t;
|
||||
|
||||
void menu_input_key_event(bool down, unsigned keycode, uint32_t character,
|
||||
uint16_t key_modifiers);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user