2020-11-28 20:20:17 -08:00
|
|
|
class StructreeButton
|
|
|
|
|
{
|
|
|
|
|
constructor(parentPage)
|
|
|
|
|
{
|
|
|
|
|
this.parentPage = parentPage;
|
|
|
|
|
|
|
|
|
|
this.civInfoButton = Engine.GetGUIObjectByName("structreeButton");
|
|
|
|
|
this.civInfoButton.onPress = this.onPress.bind(this);
|
|
|
|
|
this.civInfoButton.caption = this.Caption;
|
|
|
|
|
this.civInfoButton.tooltip = colorizeHotkey(this.Tooltip, this.Hotkey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onPress()
|
|
|
|
|
{
|
2025-04-23 06:52:31 -07:00
|
|
|
this.parentPage.closePageCallback({ [Engine.openRequest]: {
|
2025-04-23 04:23:04 -07:00
|
|
|
"page": "page_structree.xml",
|
|
|
|
|
"argument": {
|
2024-05-10 06:16:52 -07:00
|
|
|
"civ": this.parentPage.activeCiv
|
|
|
|
|
}
|
2025-04-23 06:52:31 -07:00
|
|
|
} });
|
2020-11-28 20:20:17 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StructreeButton.prototype.Caption =
|
|
|
|
|
translate("Structure Tree");
|
|
|
|
|
|
|
|
|
|
StructreeButton.prototype.Hotkey =
|
|
|
|
|
"structree";
|
|
|
|
|
|
|
|
|
|
StructreeButton.prototype.Tooltip =
|
|
|
|
|
translate("%(hotkey)s: Switch to Structure Tree.");
|