1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00: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.