mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-01 13:52:19 -05:00
eea5135d62
* 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
29 lines
731 B
C++
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();
|
|
};
|
|
}
|