Add a tooltip text to overflowing ButtonWidget in hotkey settings panel

This commit is contained in:
Ivaylo Draganov
2019-07-02 03:47:24 +03:00
committed by abcdefg30
parent ef0cb7552d
commit 86c8dfe96e
3 changed files with 17 additions and 5 deletions

View File

@@ -207,11 +207,11 @@ namespace OpenRA.Mods.Common.Widgets
public override void MouseEntered()
{
if (TooltipContainer == null || GetTooltipText() == null)
if (TooltipContainer == null)
return;
tooltipContainer.Value.SetTooltip(TooltipTemplate,
new WidgetArgs { { "button", this }, { "getText", GetTooltipText }, { "getDesc", GetTooltipDesc } });
if (GetTooltipText != null)
tooltipContainer.Value.SetTooltip(TooltipTemplate, new WidgetArgs { { "button", this }, { "getText", GetTooltipText }, { "getDesc", GetTooltipDesc } });
}
public override void MouseExited()