Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/top_panel/CivIcon.js
/** | /** | ||||
* This displas the emblem of the civilization of the currently viewed player in the top panel. | * This displays the emblem of the civilization of the currently viewed player in the top panel. | ||||
* If clicked, it opens the structure tree or history dialog for the last viewed civilization. | * If clicked, it opens the Structure Tree or Civilization Overview dialog, for the last viewed civilization. | ||||
*/ | */ | ||||
class CivIcon | class CivIcon | ||||
{ | { | ||||
constructor(playerViewControl) | constructor(playerViewControl) | ||||
{ | { | ||||
this.dialogSelection = { | this.dialogSelection = { | ||||
"civ": "", | "civ": "", | ||||
"page": "page_structree.xml" | "page": "page_structree.xml" | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | this.civIconOverlay.tooltip = sprintf(translate(this.Tooltip), { | ||||
"civ": setStringTags(civData.Name, this.CivTags), | "civ": setStringTags(civData.Name, this.CivTags), | ||||
"hotkey_civinfo": colorizeHotkey("%(hotkey)s", "civinfo"), | "hotkey_civinfo": colorizeHotkey("%(hotkey)s", "civinfo"), | ||||
"hotkey_structree": colorizeHotkey("%(hotkey)s", "structree") | "hotkey_structree": colorizeHotkey("%(hotkey)s", "structree") | ||||
}); | }); | ||||
} | } | ||||
} | } | ||||
CivIcon.prototype.Tooltip = | CivIcon.prototype.Tooltip = | ||||
markForTranslation("%(civ)s\n%(hotkey_civinfo)s / %(hotkey_structree)s: View History / Structure Tree\nLast opened will be reopened on click."); | markForTranslation("%(civ)s\n%(hotkey_civinfo)s / %(hotkey_structree)s: View Civilization Overview / Structure Tree\nLast opened will be reopened on click."); | ||||
CivIcon.prototype.CivTags = { "font": "sans-bold-stroke-14" }; | CivIcon.prototype.CivTags = { "font": "sans-bold-stroke-14" }; |
Wildfire Games · Phabricator