hide deleted keys

pull/685/head
Greenlamp 2024-05-15 03:04:43 +02:00
parent cba9049613
commit 85a0debb6c
2 changed files with 7 additions and 2 deletions

View File

@ -242,9 +242,13 @@ export default abstract class AbstractSettingsUiUiHandler extends UiHandler {
// For each element in the binding settings, update the icon according to the current assignment. // For each element in the binding settings, update the icon according to the current assignment.
for (const elm of this.bindingSettings) { for (const elm of this.bindingSettings) {
// const key = getKeyForSettingName(activeConfig, elm); // Get the key for the setting name.
const {key, icon} = getKeyAndActionFromCurrentKeysWithSettingName(activeConfig, elm); const {key, icon} = getKeyAndActionFromCurrentKeysWithSettingName(activeConfig, elm);
this.inputsIcons[key].setFrame(icon); // Set the icon frame to the inputs icon object. if (icon) {
this.inputsIcons[key].setFrame(icon);
this.inputsIcons[key].alpha = 1;
} else {
this.inputsIcons[key].alpha = 0;
}
} }
// Set the cursor and scroll cursor to their initial positions. // Set the cursor and scroll cursor to their initial positions.

View File

@ -98,6 +98,7 @@ export default class SettingsKeyboardUiHandler extends AbstractSettingsUiUiHandl
if (setting === this.settingDevice.Default_Layout) { if (setting === this.settingDevice.Default_Layout) {
// Iterate over all layouts excluding the 'noGamepads' special case. // Iterate over all layouts excluding the 'noGamepads' special case.
for (const _key of Object.keys(this.layout)) { for (const _key of Object.keys(this.layout)) {
if (_key === 'noKeyboard') continue; // Skip updating the no gamepad layout.
// Update the text of the first option label under the current setting to the name of the chosen gamepad, // Update the text of the first option label under the current setting to the name of the chosen gamepad,
// truncating the name to 30 characters if necessary. // truncating the name to 30 characters if necessary.
this.layout[_key].optionValueLabels[index][0].setText(truncateString(this.scene.inputController.chosenKeyboard, 30)); this.layout[_key].optionValueLabels[index][0].setText(truncateString(this.scene.inputController.chosenKeyboard, 30));