mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-18 14:23:56 -07:00
The various pages of the Reference Suite (`structree`, `civinfo`, `viewer`) all use the same `CloseButton` object, and the same hotkey to close each page. The hotkey that is listened for is the one assigned to `cancel`, however the tooltip was attempting to display the hotkey assigned to `close` (which doesn't actually exist). This was SVN commit r24601.
16 lines
413 B
JavaScript
16 lines
413 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 =
|
|
"cancel";
|