1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Use "enum class" for input enums

This commit is contained in:
Aaron Franke
2021-08-13 16:31:57 -05:00
parent 4f85cad013
commit 3c0fdcc8ac
154 changed files with 3482 additions and 3392 deletions

View File

@@ -53,10 +53,10 @@ public:
struct JoypadEvent {
int device = 0;
int type = 0;
int index = 0;
int index = 0; // Can be either JoyAxis or JoyButton.
bool pressed = false;
float value = 0;
int hat = 0;
HatMask hat = HatMask::CENTER;
};
private:
@@ -65,7 +65,7 @@ private:
bool control_mem = false;
bool meta_mem = false;
MouseButton buttons_state = MOUSE_BUTTON_NONE;
MouseButton buttons_state = MouseButton::NONE;
Vector<TouchPos> touch;
Point2 hover_prev_pos; // needed to calculate the relative position on hover events