Move BLANK_PRESET_DATA to Table class

This commit is contained in:
redphx
2024-12-24 06:43:08 +07:00
parent c1786d3fba
commit 907e595b1e
12 changed files with 103 additions and 78 deletions

View File

@@ -1246,6 +1246,15 @@ class MkbMappingPresetsTable extends BasePresetsTable {
}
}
};
BLANK_PRESET_DATA = {
mapping: {},
mouse: {
mapTo: 2,
sensitivityX: 100,
sensitivityY: 100,
deadzoneCounterweight: 20
}
};
DEFAULT_PRESET_ID = -1;
constructor() {
super(LocalDb.TABLE_VIRTUAL_CONTROLLERS);
@@ -1273,6 +1282,9 @@ class KeyboardShortcutsTable extends BasePresetsTable {
}
}
};
BLANK_PRESET_DATA = {
mapping: {}
};
DEFAULT_PRESET_ID = -1;
constructor() {
super(LocalDb.TABLE_KEYBOARD_SHORTCUTS);
@@ -2617,6 +2629,9 @@ class ControllerShortcutsTable extends BasePresetsTable {
}
}
};
BLANK_PRESET_DATA = {
mapping: {}
};
DEFAULT_PRESET_ID = -1;
constructor() {
super(LocalDb.TABLE_CONTROLLER_SHORTCUTS);
@@ -2648,6 +2663,16 @@ class ControllerCustomizationsTable extends BasePresetsTable {
}
}
};
BLANK_PRESET_DATA = {
mapping: {},
settings: {
leftTriggerRange: [0, 100],
rightTriggerRange: [0, 100],
leftStickDeadzone: [0, 100],
rightStickDeadzone: [0, 100],
vibrationIntensity: 100
}
};
DEFAULT_PRESET_ID = 0;
}
class ControllerSettingsTable extends BaseLocalTable {