mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:00:43 +00:00
Rename Replay speed to Game speed in Singleplayer (#1145)
## Description: Change the title of the replay panel from "Replay speed" to "Game speed" when in a Singleplayer game. BEFORE  AFTER  ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: tryout33
This commit is contained in:
@@ -446,7 +446,8 @@
|
||||
"alliances": "Alliances"
|
||||
},
|
||||
"replay_panel": {
|
||||
"replay_speed": "Replay speed"
|
||||
"replay_speed": "Replay speed",
|
||||
"game_speed": "Game speed"
|
||||
},
|
||||
"error_modal": {
|
||||
"crashed": "Game crashed!",
|
||||
|
||||
@@ -18,12 +18,15 @@ export class ReplayPanel extends LitElement implements Layer {
|
||||
|
||||
@state()
|
||||
private _replaySpeedMultiplier: number = defaultReplaySpeedMultiplier;
|
||||
private _isSinglePlayer: boolean = false;
|
||||
|
||||
@state()
|
||||
private _isVisible = false;
|
||||
|
||||
init() {
|
||||
if (this.game?.config().gameConfig().gameType === GameType.Singleplayer) {
|
||||
this._isSinglePlayer =
|
||||
this.game?.config().gameConfig().gameType === GameType.Singleplayer;
|
||||
if (this._isSinglePlayer) {
|
||||
this.setVisible(true);
|
||||
}
|
||||
}
|
||||
@@ -65,7 +68,9 @@ export class ReplayPanel extends LitElement implements Layer {
|
||||
@contextmenu=${(e) => e.preventDefault()}
|
||||
>
|
||||
<label class="block mb-1 text-white" translate="no">
|
||||
${translateText("replay_panel.replay_speed")}
|
||||
${this._isSinglePlayer
|
||||
? translateText("replay_panel.game_speed")
|
||||
: translateText("replay_panel.replay_speed")}
|
||||
</label>
|
||||
<div class="grid grid-cols-2 gap-1">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user