mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-06 18:09:10 +00:00
[UI][Enhancement] Implement keybind migrator (#5431)
Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>
This commit is contained in:
parent
9ff20af8b7
commit
078c3d00ce
@ -564,6 +564,15 @@ export class InputsController {
|
|||||||
if (!this.configs[selectedDevice]) {
|
if (!this.configs[selectedDevice]) {
|
||||||
this.configs[selectedDevice] = {};
|
this.configs[selectedDevice] = {};
|
||||||
}
|
}
|
||||||
|
// A proper way of handling migrating keybinds would be much better
|
||||||
|
const mappingOverrides = {
|
||||||
|
"BUTTON_CYCLE_VARIANT": "BUTTON_CYCLE_TERA",
|
||||||
|
};
|
||||||
|
for (const key in mappingConfigs.custom) {
|
||||||
|
if (mappingConfigs.custom[key] in mappingOverrides) {
|
||||||
|
mappingConfigs.custom[key] = mappingOverrides[mappingConfigs.custom[key]];
|
||||||
|
}
|
||||||
|
}
|
||||||
this.configs[selectedDevice].custom = mappingConfigs.custom;
|
this.configs[selectedDevice].custom = mappingConfigs.custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user