mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-10 09:29:25 +02:00
Fixed the various .setOrigin(0,0)
This commit is contained in:
parent
941c45f704
commit
6bf01622b2
@ -306,7 +306,7 @@ export class PartyUiHandler extends MessageUiHandler {
|
|||||||
const partyMessageText = addTextObject(10, 8, defaultMessage, TextStyle.WINDOW, { maxLines: 2 });
|
const partyMessageText = addTextObject(10, 8, defaultMessage, TextStyle.WINDOW, { maxLines: 2 });
|
||||||
partyMessageText.setName("text-party-msg");
|
partyMessageText.setName("text-party-msg");
|
||||||
|
|
||||||
partyMessageText.setOrigin(0, 0);
|
partyMessageText.setOrigin(0);
|
||||||
partyMessageBoxContainer.add(partyMessageText);
|
partyMessageBoxContainer.add(partyMessageText);
|
||||||
|
|
||||||
this.message = partyMessageText;
|
this.message = partyMessageText;
|
||||||
@ -1237,7 +1237,7 @@ export class PartyUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
if (!this.optionsCursorObj) {
|
if (!this.optionsCursorObj) {
|
||||||
this.optionsCursorObj = globalScene.add.image(0, 0, "cursor");
|
this.optionsCursorObj = globalScene.add.image(0, 0, "cursor");
|
||||||
this.optionsCursorObj.setOrigin(0, 0);
|
this.optionsCursorObj.setOrigin(0);
|
||||||
this.optionsContainer.add(this.optionsCursorObj);
|
this.optionsContainer.add(this.optionsCursorObj);
|
||||||
}
|
}
|
||||||
this.optionsCursorObj.setPosition(
|
this.optionsCursorObj.setPosition(
|
||||||
@ -1609,7 +1609,7 @@ export class PartyUiHandler extends MessageUiHandler {
|
|||||||
optionText.setColor("#40c8f8");
|
optionText.setColor("#40c8f8");
|
||||||
optionText.setShadowColor("#006090");
|
optionText.setShadowColor("#006090");
|
||||||
}
|
}
|
||||||
optionText.setOrigin(0, 0);
|
optionText.setOrigin(0);
|
||||||
|
|
||||||
/** For every item that has stack bigger than 1, display the current quantity selection */
|
/** For every item that has stack bigger than 1, display the current quantity selection */
|
||||||
const itemModifiers = this.getItemModifiers(pokemon);
|
const itemModifiers = this.getItemModifiers(pokemon);
|
||||||
@ -1900,7 +1900,7 @@ class PartySlot extends Phaser.GameObjects.Container {
|
|||||||
this.slotIndex >= battlerCount ? 21 : 24,
|
this.slotIndex >= battlerCount ? 21 : 24,
|
||||||
(this.slotIndex >= battlerCount ? 2 : 10) + (offsetJa ? 2 : 0),
|
(this.slotIndex >= battlerCount ? 2 : 10) + (offsetJa ? 2 : 0),
|
||||||
);
|
);
|
||||||
this.slotName.setOrigin(0, 0);
|
this.slotName.setOrigin(0);
|
||||||
|
|
||||||
const slotLevelLabel = globalScene.add.image(0, 0, "party_slot_overlay_lv");
|
const slotLevelLabel = globalScene.add.image(0, 0, "party_slot_overlay_lv");
|
||||||
slotLevelLabel.setPositionRelative(
|
slotLevelLabel.setPositionRelative(
|
||||||
@ -1908,7 +1908,7 @@ class PartySlot extends Phaser.GameObjects.Container {
|
|||||||
(this.slotIndex >= battlerCount ? 21 : 24) + 8,
|
(this.slotIndex >= battlerCount ? 21 : 24) + 8,
|
||||||
(this.slotIndex >= battlerCount ? 2 : 10) + 12,
|
(this.slotIndex >= battlerCount ? 2 : 10) + 12,
|
||||||
);
|
);
|
||||||
slotLevelLabel.setOrigin(0, 0);
|
slotLevelLabel.setOrigin(0);
|
||||||
|
|
||||||
const slotLevelText = addTextObject(
|
const slotLevelText = addTextObject(
|
||||||
0,
|
0,
|
||||||
@ -1940,7 +1940,7 @@ class PartySlot extends Phaser.GameObjects.Container {
|
|||||||
if (this.pokemon.fusionSpecies) {
|
if (this.pokemon.fusionSpecies) {
|
||||||
const splicedIcon = globalScene.add.image(0, 0, "icon_spliced");
|
const splicedIcon = globalScene.add.image(0, 0, "icon_spliced");
|
||||||
splicedIcon.setScale(0.5);
|
splicedIcon.setScale(0.5);
|
||||||
splicedIcon.setOrigin(0, 0);
|
splicedIcon.setOrigin(0);
|
||||||
if (this.slotIndex >= battlerCount) {
|
if (this.slotIndex >= battlerCount) {
|
||||||
splicedIcon.setPositionRelative(slotLevelLabel, 36 + (genderSymbol ? 8 : 0), 0.5);
|
splicedIcon.setPositionRelative(slotLevelLabel, 36 + (genderSymbol ? 8 : 0), 0.5);
|
||||||
} else {
|
} else {
|
||||||
@ -1953,7 +1953,7 @@ class PartySlot extends Phaser.GameObjects.Container {
|
|||||||
if (this.pokemon.status) {
|
if (this.pokemon.status) {
|
||||||
const statusIndicator = globalScene.add.sprite(0, 0, getLocalizedSpriteKey("statuses"));
|
const statusIndicator = globalScene.add.sprite(0, 0, getLocalizedSpriteKey("statuses"));
|
||||||
statusIndicator.setFrame(StatusEffect[this.pokemon.status?.effect].toLowerCase());
|
statusIndicator.setFrame(StatusEffect[this.pokemon.status?.effect].toLowerCase());
|
||||||
statusIndicator.setOrigin(0, 0);
|
statusIndicator.setOrigin(0);
|
||||||
statusIndicator.setPositionRelative(slotLevelLabel, this.slotIndex >= battlerCount ? 43 : 55, 0);
|
statusIndicator.setPositionRelative(slotLevelLabel, this.slotIndex >= battlerCount ? 43 : 55, 0);
|
||||||
|
|
||||||
slotInfoContainer.add(statusIndicator);
|
slotInfoContainer.add(statusIndicator);
|
||||||
@ -1963,7 +1963,7 @@ class PartySlot extends Phaser.GameObjects.Container {
|
|||||||
const doubleShiny = this.pokemon.isDoubleShiny(false);
|
const doubleShiny = this.pokemon.isDoubleShiny(false);
|
||||||
|
|
||||||
const shinyStar = globalScene.add.image(0, 0, `shiny_star_small${doubleShiny ? "_1" : ""}`);
|
const shinyStar = globalScene.add.image(0, 0, `shiny_star_small${doubleShiny ? "_1" : ""}`);
|
||||||
shinyStar.setOrigin(0, 0);
|
shinyStar.setOrigin(0);
|
||||||
shinyStar.setPositionRelative(this.slotName, -9, 3);
|
shinyStar.setPositionRelative(this.slotName, -9, 3);
|
||||||
shinyStar.setTint(getVariantTint(this.pokemon.getBaseVariant()));
|
shinyStar.setTint(getVariantTint(this.pokemon.getBaseVariant()));
|
||||||
|
|
||||||
@ -1986,7 +1986,7 @@ class PartySlot extends Phaser.GameObjects.Container {
|
|||||||
this.slotIndex >= battlerCount ? 72 : 8,
|
this.slotIndex >= battlerCount ? 72 : 8,
|
||||||
this.slotIndex >= battlerCount ? 6 : 31,
|
this.slotIndex >= battlerCount ? 6 : 31,
|
||||||
);
|
);
|
||||||
this.slotHpBar.setOrigin(0, 0);
|
this.slotHpBar.setOrigin(0);
|
||||||
this.slotHpBar.setVisible(false);
|
this.slotHpBar.setVisible(false);
|
||||||
|
|
||||||
const hpRatio = this.pokemon.getHpRatio();
|
const hpRatio = this.pokemon.getHpRatio();
|
||||||
@ -1998,7 +1998,7 @@ class PartySlot extends Phaser.GameObjects.Container {
|
|||||||
hpRatio > 0.5 ? "high" : hpRatio > 0.25 ? "medium" : "low",
|
hpRatio > 0.5 ? "high" : hpRatio > 0.25 ? "medium" : "low",
|
||||||
);
|
);
|
||||||
this.slotHpOverlay.setPositionRelative(this.slotHpBar, 16, 2);
|
this.slotHpOverlay.setPositionRelative(this.slotHpBar, 16, 2);
|
||||||
this.slotHpOverlay.setOrigin(0, 0);
|
this.slotHpOverlay.setOrigin(0);
|
||||||
this.slotHpOverlay.setScale(hpRatio, 1);
|
this.slotHpOverlay.setScale(hpRatio, 1);
|
||||||
this.slotHpOverlay.setVisible(false);
|
this.slotHpOverlay.setVisible(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user