mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-07 00:27:28 +00:00
[Bugfix] Fix a bug during bgm-bar initialization (#2822)
* Prevent sizing error * Make reboot not necessary for show BGM * Makes the BGM Bar active by default + It had originally been decided that this would not be active by default because it was to be displayed outside the pause menu, but since its behavior has changed between this decision and its integration, the default deactivation is no longer necessary
This commit is contained in:
parent
d69bedd5d7
commit
e9b13be614
@ -493,9 +493,8 @@ export const Setting: Array<Setting> = [
|
||||
key: SettingKeys.Show_BGM_Bar,
|
||||
label: i18next.t("settings:showBgmBar"),
|
||||
options: OFF_ON,
|
||||
default: 0,
|
||||
type: SettingType.DISPLAY,
|
||||
requireReload: true
|
||||
default: 1,
|
||||
type: SettingType.DISPLAY
|
||||
},
|
||||
{
|
||||
key: SettingKeys.Master_Volume,
|
||||
|
@ -45,9 +45,6 @@ export default class BgmBar extends Phaser.GameObjects.Container {
|
||||
*/
|
||||
setBgmToBgmBar(bgmName: string): void {
|
||||
this.musicText.setText(`${i18next.t("bgmName:music")}${this.getRealBgmName(bgmName)}`);
|
||||
if (!(this.scene as BattleScene).showBgmBar) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.musicText.width = this.bg.width - 20;
|
||||
this.musicText.setWordWrapWidth(this.defaultWidth * 4);
|
||||
|
@ -375,6 +375,7 @@ export default class AbstractSettingsUiHandler extends UiHandler {
|
||||
super.clear();
|
||||
this.settingsContainer.setVisible(false);
|
||||
this.eraseCursor();
|
||||
this.getUi().bgmBar.toggleBgmBar(this.scene.showBgmBar);
|
||||
if (this.reloadRequired) {
|
||||
this.reloadRequired = false;
|
||||
this.scene.reset(true, false, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user