mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-05-13 11:53:50 +01:00
[QoL] add dynamic default pp color (#2039)
This commit is contained in:
parent
e29c08ba1f
commit
7d55c165df
@ -10,6 +10,7 @@ import { MoveCategory } from "#app/data/move.js";
|
|||||||
import i18next from "../plugins/i18n";
|
import i18next from "../plugins/i18n";
|
||||||
import {Button} from "../enums/buttons";
|
import {Button} from "../enums/buttons";
|
||||||
import Pokemon, { PokemonMove } from "#app/field/pokemon.js";
|
import Pokemon, { PokemonMove } from "#app/field/pokemon.js";
|
||||||
|
import { UiTheme } from "#app/enums/ui-theme.js";
|
||||||
|
|
||||||
export default class FightUiHandler extends UiHandler {
|
export default class FightUiHandler extends UiHandler {
|
||||||
private movesContainer: Phaser.GameObjects.Container;
|
private movesContainer: Phaser.GameObjects.Container;
|
||||||
@ -180,7 +181,9 @@ export default class FightUiHandler extends UiHandler {
|
|||||||
|
|
||||||
this.ppText.setText(`${Utils.padInt(pp, 2, " ")}/${Utils.padInt(maxPP, 2, " ")}`);
|
this.ppText.setText(`${Utils.padInt(pp, 2, " ")}/${Utils.padInt(maxPP, 2, " ")}`);
|
||||||
const ppPercentLeft = pp / maxPP;
|
const ppPercentLeft = pp / maxPP;
|
||||||
let ppColor = "white";
|
|
||||||
|
let ppColor = this.scene.uiTheme === UiTheme.DEFAULT ? "white" : "black";
|
||||||
|
|
||||||
if (ppPercentLeft <= 0.5) {
|
if (ppPercentLeft <= 0.5) {
|
||||||
ppColor = "yellow";
|
ppColor = "yellow";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user