1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-25 21:55:25 +02:00

Remove gui_button abstraction from joystick

It brings no benefit and doesn't make sense there
This commit is contained in:
Gregor Parzefall
2024-03-14 12:55:34 +01:00
parent 7a9315362b
commit 28ea8da7ca
2 changed files with 47 additions and 53 deletions

View File

@@ -251,9 +251,9 @@ private:
bool m_fixed_joystick = false;
bool m_joystick_triggers_aux1 = false;
bool m_draw_crosshair = false;
button_info m_joystick_btn_off;
button_info m_joystick_btn_bg;
button_info m_joystick_btn_center;
irr_ptr<IGUIButton> m_joystick_btn_off;
irr_ptr<IGUIButton> m_joystick_btn_bg;
irr_ptr<IGUIButton> m_joystick_btn_center;
button_info m_buttons[after_last_element_id];
@@ -272,9 +272,8 @@ private:
float repeat_delay = BUTTON_REPEAT_DELAY);
// initialize a joystick button
button_info initJoystickButton(touch_gui_button_id id,
const rect<s32> &button_rect, int texture_id,
bool visible = true);
IGUIButton *initJoystickButton(touch_gui_button_id id,
const rect<s32> &button_rect, bool visible);
// handle a button event
void handleButtonEvent(touch_gui_button_id id, size_t pointer_id, bool action);