mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 17:29:30 +02:00
Added setting to enable / disable display
This commit is contained in:
parent
2b40ac7d58
commit
71b1e59b61
@ -113,6 +113,7 @@ export default class BattleScene extends SceneBase {
|
|||||||
public reroll: boolean = false;
|
public reroll: boolean = false;
|
||||||
public showMovesetFlyout: boolean = true;
|
public showMovesetFlyout: boolean = true;
|
||||||
public showTeams: boolean = true;
|
public showTeams: boolean = true;
|
||||||
|
public showTeamSprites: boolean = false;
|
||||||
public showArenaFlyout: boolean = true;
|
public showArenaFlyout: boolean = true;
|
||||||
public showTimeOfDayWidget: boolean = true;
|
public showTimeOfDayWidget: boolean = true;
|
||||||
public timeOfDayAnimation: EaseType = EaseType.NONE;
|
public timeOfDayAnimation: EaseType = EaseType.NONE;
|
||||||
|
@ -1685,6 +1685,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
toggleFlyout(visible: boolean): void {
|
toggleFlyout(visible: boolean): void {
|
||||||
this.battleInfo.toggleFlyout(visible);
|
this.battleInfo.toggleFlyout(visible);
|
||||||
}
|
}
|
||||||
|
toggleTeamTray(visible: boolean): void {
|
||||||
|
this.battleInfo.toggleTeamTray(visible);
|
||||||
|
}
|
||||||
|
|
||||||
addExp(exp: integer) {
|
addExp(exp: integer) {
|
||||||
const maxExpLevel = this.scene.getMaxExpLevel();
|
const maxExpLevel = this.scene.getMaxExpLevel();
|
||||||
|
@ -412,6 +412,26 @@ export const Setting: Array<Setting> = [
|
|||||||
default: 1,
|
default: 1,
|
||||||
type: SettingType.DISPLAY
|
type: SettingType.DISPLAY
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: SettingKeys.Show_Pokemon_Teams,
|
||||||
|
label: i18next.t("settings:showTeamTray"),
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: "Off",
|
||||||
|
label: i18next.t("settings:off")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Ball",
|
||||||
|
label: i18next.t("settings:simple")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "Sprite",
|
||||||
|
label: i18next.t("settings:fancy")
|
||||||
|
}
|
||||||
|
],
|
||||||
|
default: 1,
|
||||||
|
type: SettingType.DISPLAY
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: SettingKeys.Show_Arena_Flyout,
|
key: SettingKeys.Show_Arena_Flyout,
|
||||||
label: i18next.t("settings:showArenaFlyout"),
|
label: i18next.t("settings:showArenaFlyout"),
|
||||||
@ -647,8 +667,8 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
|
|||||||
scene.showMovesetFlyout = Setting[index].options[value].value === "On";
|
scene.showMovesetFlyout = Setting[index].options[value].value === "On";
|
||||||
break;
|
break;
|
||||||
case SettingKeys.Show_Pokemon_Teams:
|
case SettingKeys.Show_Pokemon_Teams:
|
||||||
// Currently not used
|
scene.showTeams = Setting[index].options[value].value !== "Off";
|
||||||
scene.showTeams = Setting[index].options[value].value === "On";
|
scene.showTeamSprites = Setting[index].options[value].value === "Sprite";
|
||||||
break;
|
break;
|
||||||
case SettingKeys.Show_Arena_Flyout:
|
case SettingKeys.Show_Arena_Flyout:
|
||||||
scene.showArenaFlyout = Setting[index].options[value].value === "On";
|
scene.showArenaFlyout = Setting[index].options[value].value === "On";
|
||||||
|
@ -132,7 +132,7 @@ export class UiInputs {
|
|||||||
buttonStats(pressed: boolean = true): void {
|
buttonStats(pressed: boolean = true): void {
|
||||||
// allow access to Button.STATS as a toggle for other elements
|
// allow access to Button.STATS as a toggle for other elements
|
||||||
for (const t of this.scene.getInfoToggles(true)) {
|
for (const t of this.scene.getInfoToggles(true)) {
|
||||||
t.toggleInfo(pressed);
|
t.toggleInfo(pressed,);
|
||||||
}
|
}
|
||||||
// handle normal pokemon battle ui
|
// handle normal pokemon battle ui
|
||||||
for (const p of this.scene.getField().filter(p => p?.isActive(true))) {
|
for (const p of this.scene.getField().filter(p => p?.isActive(true))) {
|
||||||
@ -146,6 +146,12 @@ export class UiInputs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.scene.showTeams) {
|
||||||
|
for (const p of this.scene.getField().filter(p => p?.isActive(true))) {
|
||||||
|
p.toggleTeamTray(pressed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.scene.showArenaFlyout) {
|
if (this.scene.showArenaFlyout) {
|
||||||
this.scene.ui.processInfoButton(pressed);
|
this.scene.ui.processInfoButton(pressed);
|
||||||
}
|
}
|
||||||
|
@ -888,6 +888,12 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
} else {
|
} else {
|
||||||
this.updateEffectiveness(this.currentEffectiveness);
|
this.updateEffectiveness(this.currentEffectiveness);
|
||||||
}
|
}
|
||||||
|
if (!this.override) this.switchIconVisibility(visible);
|
||||||
|
// this.teamIconOver[ballindex].setAlpha(0.4, 0.4, 0.7, 0.7)
|
||||||
|
}
|
||||||
|
toggleTeamTray(visible: boolean): void {
|
||||||
|
this.pressedShow = visible;
|
||||||
|
if (!this.override) this.switchIconVisibility(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user