mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Place nodes with single tap on Android (+ bugfix) (#13187)
Don't place nodes when closing button bars. Update docs (also in-game). Rename "Default controls" -> "Controls" in Android pause menu since players can't change them (normally), so calling them "default" doesn't make sense.
This commit is contained in:
parent
6832bf044e
commit
fc3d6c1dd9
4 changed files with 23 additions and 56 deletions
|
@ -130,6 +130,9 @@ public:
|
|||
// step handler
|
||||
void step(float dtime);
|
||||
|
||||
// return whether the button bar is active
|
||||
bool active() { return m_active; }
|
||||
|
||||
// deactivate button bar
|
||||
void deactivate();
|
||||
|
||||
|
@ -284,8 +287,8 @@ private:
|
|||
// handle pressed hud buttons
|
||||
bool isHUDButton(const SEvent &event);
|
||||
|
||||
// handle double taps
|
||||
bool doubleTapDetection();
|
||||
// do a right-click
|
||||
bool doRightClick();
|
||||
|
||||
// handle release event
|
||||
void handleReleaseEvent(size_t evt_id);
|
||||
|
@ -293,20 +296,9 @@ private:
|
|||
// apply joystick status
|
||||
void applyJoystickStatus();
|
||||
|
||||
// double-click detection variables
|
||||
struct key_event
|
||||
{
|
||||
u64 down_time;
|
||||
s32 x;
|
||||
s32 y;
|
||||
};
|
||||
|
||||
// array for saving last known position of a pointer
|
||||
std::map<size_t, v2s32> m_pointerpos;
|
||||
|
||||
// array for double tap detection
|
||||
key_event m_key_events[2];
|
||||
|
||||
// settings bar
|
||||
AutoHideButtonBar m_settingsbar;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue