Shipwright/libultraship/libultraship/KeyboardController.h
Sirius902 eea5135d62
Rumble cvar and fixes (#184)
* Rumble indefinitely until turned off

* Add rumble cvar

* Register CVar

* Check if controller can rumble to insert rumble pak

* Reduce verbosity of checks

* Remove extraneous const_cast

* Once again remove extraneous const_cast

* Add per-controller settings

* Add nice spacing

* Only display controller entry if pad connected

* Const some stuff
2022-04-26 19:50:24 -04:00

29 lines
731 B
C++

#pragma once
#include "Controller.h"
#include <string>
namespace Ship {
class KeyboardController : public Controller {
public:
KeyboardController(int32_t dwControllerNumber);
~KeyboardController();
void ReadFromSource();
void WriteToSource(ControllerCallback* controller);
bool Connected() const { return true; }
bool CanRumble() const { return false; }
bool PressButton(int32_t dwScancode);
bool ReleaseButton(int32_t dwScancode);
void ReleaseAllButtons();
bool HasPadConf() const { return false; }
std::optional<std::string> GetPadConfSection() { return {}; }
protected:
std::string GetControllerType();
std::string GetConfSection();
std::string GetBindingConfSection();
};
}