first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,45 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __KEYBOARD_INPUT__
#define __KEYBOARD_INPUT__
#include "input/input_device.h"
namespace GS {
namespace Input {
/*
@short Keyboard input device.
@author Emmanuel Julien (ejulien@nworks.fr)
*/
class Keyboard : public Device
{
protected:
bool is_down[Key_Last],
was_down[Key_Last];
public:
virtual Type GetType() const { return Type_Keyboard; }
virtual const char *GetName() const { return "Keyboard"; }
virtual void Update() = 0;
virtual bool IsDown(KeyCode k) const { return is_down[k]; }
virtual bool WasDown(KeyCode k) const { return was_down[k]; }
Keyboard();
};
} // Input
} // GS
#endif // __KEYBOARD_INPUT__