forked from mirrors/0ad
b2842e8021
Commenters: elexis, Stan, Angen Refs.: #5387 Differential Revision: https://code.wildfiregames.com/D2734 This was SVN commit r23808.
28 lines
653 B
JavaScript
28 lines
653 B
JavaScript
class CivInfoButton
|
|
{
|
|
constructor(parentPage)
|
|
{
|
|
this.parentPage = parentPage;
|
|
|
|
this.civInfoButton = Engine.GetGUIObjectByName("civInfoButton");
|
|
this.civInfoButton.onPress = this.onPress.bind(this);
|
|
this.civInfoButton.caption = this.Caption;
|
|
this.civInfoButton.tooltip = colorizeHotkey(this.Tooltip, this.Hotkey);
|
|
}
|
|
|
|
onPress()
|
|
{
|
|
Engine.PopGuiPage({ "civ": this.parentPage.activeCiv, "nextPage": "page_civinfo.xml" });
|
|
}
|
|
|
|
}
|
|
|
|
CivInfoButton.prototype.Caption =
|
|
translate("Civilization Overview");
|
|
|
|
CivInfoButton.prototype.Hotkey =
|
|
"civinfo";
|
|
|
|
CivInfoButton.prototype.Tooltip =
|
|
translate("%(hotkey)s: Switch to Civilization Overview.");
|