mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-22 07:19:28 +02:00
Revert line break for languages
This commit is contained in:
parent
84d61d8dca
commit
2477eff434
@ -5,5 +5,5 @@ export const commandUiHandler: SimpleTranslationEntries = {
|
|||||||
"ball": "Ball",
|
"ball": "Ball",
|
||||||
"pokemon": "Pokémon",
|
"pokemon": "Pokémon",
|
||||||
"run": "Run",
|
"run": "Run",
|
||||||
"actionMessage": "What will {{pokemonName}} do?",
|
"actionMessage": "What will\n{{pokemonName}} do?",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -5,5 +5,5 @@ export const commandUiHandler: SimpleTranslationEntries = {
|
|||||||
"ball": "Ball",
|
"ball": "Ball",
|
||||||
"pokemon": "Pokémon",
|
"pokemon": "Pokémon",
|
||||||
"run": "Fliehen",
|
"run": "Fliehen",
|
||||||
"actionMessage": "Was soll {{pokemonName}} tun?",
|
"actionMessage": "Was soll\n{{pokemonName}} tun?",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -5,5 +5,5 @@ export const commandUiHandler: SimpleTranslationEntries = {
|
|||||||
"ball": "Ball",
|
"ball": "Ball",
|
||||||
"pokemon": "Pokémon",
|
"pokemon": "Pokémon",
|
||||||
"run": "Run",
|
"run": "Run",
|
||||||
"actionMessage": "What will {{pokemonName}} do?",
|
"actionMessage": "What will\n{{pokemonName}} do?",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -5,5 +5,5 @@ export const commandUiHandler: SimpleTranslationEntries = {
|
|||||||
"ball": "Balls",
|
"ball": "Balls",
|
||||||
"pokemon": "Pokémon",
|
"pokemon": "Pokémon",
|
||||||
"run": "Huir",
|
"run": "Huir",
|
||||||
"actionMessage": "¿Qué debería hacer {{pokemonName}}?",
|
"actionMessage": "¿Qué debería\nhacer {{pokemonName}}?",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -5,5 +5,5 @@ export const commandUiHandler: SimpleTranslationEntries = {
|
|||||||
"ball": "Bolas",
|
"ball": "Bolas",
|
||||||
"pokemon": "Pokémon",
|
"pokemon": "Pokémon",
|
||||||
"run": "Fugir",
|
"run": "Fugir",
|
||||||
"actionMessage": "O que {{pokemonName}} deve fazer?",
|
"actionMessage": "O que {{pokemonName}}\ndeve fazer?",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -5,5 +5,5 @@ export const commandUiHandler: SimpleTranslationEntries = {
|
|||||||
"ball": "精灵球",
|
"ball": "精灵球",
|
||||||
"pokemon": "宝可梦",
|
"pokemon": "宝可梦",
|
||||||
"run": "逃跑",
|
"run": "逃跑",
|
||||||
"actionMessage": "要让 {{pokemonName}} 做什么?",
|
"actionMessage": "要让\n{{pokemonName}} 做什么?",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -5,5 +5,5 @@ export const commandUiHandler: SimpleTranslationEntries = {
|
|||||||
"ball": "精靈球",
|
"ball": "精靈球",
|
||||||
"pokemon": "寶可夢",
|
"pokemon": "寶可夢",
|
||||||
"run": "逃跑",
|
"run": "逃跑",
|
||||||
"actionMessage": "要讓 {{pokemonName}} 做甚麼?",
|
"actionMessage": "要讓\n{{pokemonName}} 做甚麼?",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -70,7 +70,7 @@ export default class CommandUiHandler extends UiHandler {
|
|||||||
const messageMaxWidth = this.scene.game.canvas.width - messageHandler.commandWindow.getBounds().width - messageHandler.message.getBounds().x;
|
const messageMaxWidth = this.scene.game.canvas.width - messageHandler.commandWindow.getBounds().width - messageHandler.message.getBounds().x;
|
||||||
messageHandler.message.setWordWrapWidth(messageMaxWidth);
|
messageHandler.message.setWordWrapWidth(messageMaxWidth);
|
||||||
const commandMessage = i18next.t("commandUiHandler:actionMessage", {pokemonName: getPokemonNameWithAffix(commandPhase.getPokemon())});
|
const commandMessage = i18next.t("commandUiHandler:actionMessage", {pokemonName: getPokemonNameWithAffix(commandPhase.getPokemon())});
|
||||||
messageHandler.adjustText(commandMessage,messageHandler.message,messageMaxWidth);
|
messageHandler.adjustText(commandMessage,messageHandler.message,messageMaxWidth,{ ignoreTextBalance:"all" });
|
||||||
|
|
||||||
messageHandler.showText(commandMessage, 0);
|
messageHandler.showText(commandMessage, 0);
|
||||||
this.setCursor(this.getCursor());
|
this.setCursor(this.getCursor());
|
||||||
|
@ -517,10 +517,8 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
showText(text: string, delay?: number, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number): void {
|
showText(text: string, delay?: number, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number): void {
|
||||||
this.menuMessageBoxContainer.setVisible(!!text);
|
this.menuMessageBoxContainer.setVisible(!!text);
|
||||||
const messageText = this.message;
|
this.adjustText(text, this.message, this.messageBoxBg.getBounds().width, {
|
||||||
const messageBox = this.messageBoxBg;
|
padding: this.message.x,
|
||||||
this.adjustText(text,messageText,messageBox.getBounds().width,{
|
|
||||||
padding: messageText.x,
|
|
||||||
ignoreTextBalance: "all"
|
ignoreTextBalance: "all"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import i18next from "i18next";
|
|||||||
type argsAjustText = {
|
type argsAjustText = {
|
||||||
padding?:number;
|
padding?:number;
|
||||||
ignoreTextBalance?:Array<string>|"all";
|
ignoreTextBalance?:Array<string>|"all";
|
||||||
ignoreLanguages?: Array<string>;
|
ignoreLanguages?:Array<string>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default abstract class MessageUiHandler extends AwaitableUiHandler {
|
export default abstract class MessageUiHandler extends AwaitableUiHandler {
|
||||||
@ -227,8 +227,8 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
|
|||||||
textObject.setData("originalFontSize", textObject.getData("originalFontSize") ?? fontSize);
|
textObject.setData("originalFontSize", textObject.getData("originalFontSize") ?? fontSize);
|
||||||
textObject.setFontSize(fontSize);
|
textObject.setFontSize(fontSize);
|
||||||
|
|
||||||
const textWrapped = ()=>textObject.getWrappedText(text);
|
const textWrapped = () => textObject.getWrappedText(text);
|
||||||
const textSize = ()=>Phaser.GameObjects.GetTextSize(textObject,textObject.style.getTextMetrics(),textWrapped());
|
const textSize = () => Phaser.GameObjects.GetTextSize(textObject,textObject.style.getTextMetrics(),textWrapped());
|
||||||
const balanceText = typeof opts.ignoreTextBalance === "string" ? opts.ignoreTextBalance === "all" : (opts.ignoreTextBalance && opts.ignoreTextBalance[0] && opts.ignoreTextBalance.some(localKey=> localKey === currentLanguage));
|
const balanceText = typeof opts.ignoreTextBalance === "string" ? opts.ignoreTextBalance === "all" : (opts.ignoreTextBalance && opts.ignoreTextBalance[0] && opts.ignoreTextBalance.some(localKey=> localKey === currentLanguage));
|
||||||
|
|
||||||
// Text Balance
|
// Text Balance
|
||||||
|
Loading…
Reference in New Issue
Block a user