mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Cleanup ClientLauncher structure (#10160)
Remove duplicated variables and unify the startup data into a new (inherited) struct.
This commit is contained in:
parent
2bec83eec0
commit
4fa1e03f68
7 changed files with 197 additions and 200 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue