1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Formspec: Pass the second-touch event as is (#13872)

The second-touch event is passed to the GUIFormSpecMenu::OnEvent() function as a touch event.
There are two types of event for inventory formspec: (1) mouse event and (2) touch event.
The touch event is just a modifier of the mouse event.


Co-authored-by: Gregor Parzefall <82708541+grorp@users.noreply.github.com>
This commit is contained in:
Muhammad Rifqi Priyo Susanto 2023-11-28 07:00:07 +07:00 committed by GitHub
parent 771da80bbb
commit 53886dcdb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 97 additions and 62 deletions

View file

@ -77,7 +77,8 @@ protected:
std::string m_jni_field_name;
#endif
#ifdef HAVE_TOUCHSCREENGUI
v2s32 m_down_pos;
// This is set to true if the menu is currently processing a second-touch event.
bool m_second_touch = false;
bool m_touchscreen_visible = true;
#endif