1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 08:05:18 +02:00

Auto-toggle TouchControls in-game when receiving touch/mouse input

This commit is contained in:
grorp
2024-09-28 11:23:09 +02:00
committed by grorp
parent 3c5f05b284
commit 4952f17df4
15 changed files with 152 additions and 89 deletions

View File

@@ -347,6 +347,9 @@ struct SEvent
//! Type of mouse event
EMOUSE_INPUT_EVENT Event;
//! Is this a simulated mouse event generated by Minetest itself?
bool Simulated;
};
//! Any kind of keyboard event.
@@ -538,6 +541,11 @@ struct SEvent
struct SUserEvent UserEvent;
struct SApplicationEvent ApplicationEvent;
};
SEvent() {
// would be left uninitialized in many places otherwise
MouseInput.Simulated = false;
}
};
//! Interface of an object which can receive events.