ControllerInterface: Rename full surface analog inputs to be more visually dissimilar from their underlying inputs. e.g. "Full Axis X+".

This commit is contained in:
Jordan Woyak
2019-03-13 19:47:52 -05:00
parent 241166a1a5
commit be897b41a7
2 changed files with 33 additions and 4 deletions

View File

@ -46,6 +46,10 @@ public:
virtual ~Control() {}
virtual Input* ToInput() { return nullptr; }
virtual Output* ToOutput() { return nullptr; }
// May be overridden to allow multiple valid names.
// Useful for backwards-compatible configurations when names change.
virtual bool IsMatchingName(const std::string& name) const;
};
//
@ -114,12 +118,13 @@ protected:
void AddInput(Input* const i);
void AddOutput(Output* const o);
class FullAnalogSurface : public Input
class FullAnalogSurface final : public Input
{
public:
FullAnalogSurface(Input* low, Input* high) : m_low(*low), m_high(*high) {}
ControlState GetState() const override;
std::string GetName() const override { return m_low.GetName() + *m_high.GetName().rbegin(); }
std::string GetName() const override;
bool IsMatchingName(const std::string& name) const override;
private:
Input& m_low;