mirror of
https://github.com/minetest/minetest.git
synced 2025-07-07 10:20:28 +02:00
Cleanup ClientLauncher structure (#10160)
Remove duplicated variables and unify the startup data into a new (inherited) struct.
This commit is contained in:
@ -219,6 +219,11 @@ public:
|
||||
|
||||
virtual ~InputHandler() = default;
|
||||
|
||||
virtual bool isRandom() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool isKeyDown(GameKeyType k) = 0;
|
||||
virtual bool wasKeyDown(GameKeyType k) = 0;
|
||||
virtual bool cancelPressed() = 0;
|
||||
@ -372,6 +377,11 @@ class RandomInputHandler : public InputHandler
|
||||
public:
|
||||
RandomInputHandler() = default;
|
||||
|
||||
bool isRandom() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool isKeyDown(GameKeyType k) { return keydown[keycache.key[k]]; }
|
||||
virtual bool wasKeyDown(GameKeyType k) { return false; }
|
||||
virtual bool cancelPressed() { return false; }
|
||||
|
Reference in New Issue
Block a user