Moved analog direction logic to sdl_impl
This commit is contained in:
parent
231d9c10f3
commit
635deb70d4
3 changed files with 47 additions and 8 deletions
|
@ -15,6 +15,13 @@
|
|||
|
||||
namespace Input {
|
||||
|
||||
enum class AnalogDirection : u8 {
|
||||
RIGHT,
|
||||
LEFT,
|
||||
UP,
|
||||
DOWN,
|
||||
};
|
||||
|
||||
/// An abstract class template for an input device (a button, an analog input, etc.).
|
||||
template <typename StatusType>
|
||||
class InputDevice {
|
||||
|
@ -23,6 +30,9 @@ public:
|
|||
virtual StatusType GetStatus() const {
|
||||
return {};
|
||||
}
|
||||
virtual bool GetAnalogDirectionStatus(AnalogDirection direction) const {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
/// An abstract class template for a factory that can create input devices.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue