mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
overlay: "reset all" buttons for buttons/overlay/analog tabs (#578)
## Link to GitHub Issue or related Pull Request, if one exists #576 ## Description of change Add `Reset All` buttons to these tabs which clears out bindings to none / default. For keypads, introduce a special `Use Preset` button which lets users pick between numpad and top row number keys. Update UI-visible string used for vKeys, especially the numpad ones (e.g., `.` is now `Numpad .` to distinguish from the regular `.` period). Breaking change: if the user never had `P1 Keypad 00` set, the default will change from `Enter` to `Numpad -` since both enter keys trigger the same. This will affect a small number of popn/ddr players. They can just change it back. ## Testing *how was the code tested?*
This commit is contained in:
@@ -49,6 +49,10 @@ private:
|
||||
std::string name;
|
||||
std::string device_identifier = "";
|
||||
unsigned short vKey = INVALID_VKEY;
|
||||
|
||||
// default bindings are always naive
|
||||
unsigned short vKey_default = INVALID_VKEY;
|
||||
|
||||
ButtonAnalogType analog_type = BAT_NONE;
|
||||
double debounce_up = 0.0;
|
||||
double debounce_down = 0.0;
|
||||
@@ -125,6 +129,14 @@ public:
|
||||
this->vKey = vKey;
|
||||
}
|
||||
|
||||
inline unsigned short getVKeyDefault() const {
|
||||
return this->vKey_default;
|
||||
}
|
||||
|
||||
inline void setVKeyDefault(unsigned short vKey_default) {
|
||||
this->vKey_default = vKey_default;
|
||||
}
|
||||
|
||||
inline ButtonAnalogType getAnalogType() const {
|
||||
return this->analog_type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user