1
0
forked from mirrors/0ad
Files
0ad/binaries/data/mods/public/gui/reference/common/Buttons/CloseButton.js
T
s0600204 b2842e8021 Rewrite Structure Tree and Template Viewer to use OOP principles
Commenters: elexis, Stan, Angen
Refs.: #5387
Differential Revision: https://code.wildfiregames.com/D2734
This was SVN commit r23808.
2020-07-07 19:11:36 +00:00

17 lines
412 B
JavaScript

class CloseButton
{
constructor(parentPage)
{
this.closeButton = Engine.GetGUIObjectByName("closeButton");
this.closeButton.onPress = parentPage.closePage.bind(parentPage);
this.closeButton.caption = this.Caption;
this.closeButton.tooltip = colorizeHotkey(parentPage.CloseButtonTooltip, this.Hotkey);
}
}
CloseButton.prototype.Caption =
translate("Close");
CloseButton.prototype.Hotkey =
"close";