mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 12:52:20 +02:00
fix the truncate of the default controller name
This commit is contained in:
parent
8491f0b1ad
commit
0066af4bd0
@ -8,6 +8,7 @@ import pad_unlicensedSNES from "#app/configs/pad_unlicensedSNES";
|
||||
import {InterfaceConfig} from "#app/inputs-controller";
|
||||
import AbstractSettingsUiUiHandler from "#app/ui/settings/abstract-settings-ui-handler";
|
||||
import {Device} from "#app/enums/devices";
|
||||
import {truncateString} from "#app/utils";
|
||||
|
||||
/**
|
||||
* Class representing the settings UI handler for gamepads.
|
||||
@ -133,7 +134,7 @@ export default class SettingsGamepadUiHandler extends AbstractSettingsUiUiHandle
|
||||
|
||||
// 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.
|
||||
this.layout[_key].optionValueLabels[index][0].setText(this.scene.inputController.selectedDevice[Device.GAMEPAD], 30);
|
||||
this.layout[_key].optionValueLabels[index][0].setText(truncateString(this.scene.inputController.selectedDevice[Device.GAMEPAD], 30));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user