GUI: Fix mobile controls

This commit is contained in:
Er2
2023-12-09 21:14:41 +03:00
parent b6bf9d616a
commit bb11bf0825
8 changed files with 37 additions and 25 deletions

View File

@@ -38,8 +38,14 @@ public:
// Also add these to allow proper text input within the game.
bool shiftPressed() override;
void setShiftPressed(bool b, bool isLeft);
bool isTouchscreen() override { return false; }
bool isTouchscreen() override {
#ifdef MOBILE
return true;
#else
return false;
#endif
}
static MouseButtonType GetMouseButtonType(SDL_Event event);
static bool GetMouseButtonState(SDL_Event event);