Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Fix #119 Adding a boolean condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Mar 24, 2022
1 parent 2e1c0f8 commit a14b9df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions boongui_data/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@
{ "value": 900, "label": "900" }
]
},
{
"type": "boolean",
"label": "[color=\"220 185 70\"]Top Panel[/color] Display time duration of replays",
"tooltip": "Decide if you want to see the time duration of the replay above the top panel. ",
"config": "boongui.showduration"
},
{
"type": "dropdown",
"label": "[color=\"220 185 70\"]Top Panel[/color] Gatheres or Income/10s",
Expand Down
3 changes: 2 additions & 1 deletion gui/session/stats/BoonGUIStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class BoonGUIStats
playerViewControl.registerViewedPlayerChangeHandler(this.onViewedPlayerChange.bind(this));
this.resizeInit();
registerPlayersFinishedHandler(this.presentStatsTopPanel.bind(this));
registerConfigChangeHandler(this.updateShortGameInfoLabel.bind(this));

this.root.onTick = this.onTick.bind(this);
}
Expand Down Expand Up @@ -313,7 +314,7 @@ class BoonGUIStats
"icon_pop": '[icon="icon_pop" displace="3 5"]',
"pop": g_InitAttributes.settings.PopulationCap !== undefined ? g_PopulationCapacities.Title[g_PopulationCapacities.Population.indexOf(g_InitAttributes.settings.PopulationCap)] : g_WorldPopulationCapacities.Title[g_WorldPopulationCapacities.Population.indexOf(g_InitAttributes.settings.WorldPopulationCap)] + " (WP)",
"rating": g_InitAttributes.settings.RatingEnabled === true ? ' [icon="icon_rating" displace="-3 5"]' + coloredText("Rated", "red") : "",
"duration": this.durationReplay()
"duration": Engine.ConfigDB_GetValue("user", "boongui.showduration") == "true" ? this.durationReplay() : ""
});
}

Expand Down

0 comments on commit a14b9df

Please sign in to comment.