Hide the action button label if it's empty. (#11902)

Reduces visual clutter just slightly, by avoiding bright white text in an otherwise empty and dark space.

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
Moony
2022-10-16 11:42:19 -05:00
committed by GitHub
parent 9d5c8e23f2
commit 5cff3b5b16

View File

@@ -294,6 +294,7 @@ public sealed class ActionButton : Control
public void UpdateData(ActionType action) public void UpdateData(ActionType action)
{ {
Action = action; Action = action;
Label.Visible = true;
UpdateIcons(); UpdateIcons();
} }
@@ -302,6 +303,7 @@ public sealed class ActionButton : Control
Action = null; Action = null;
Cooldown.Visible = false; Cooldown.Visible = false;
Cooldown.Progress = 1; Cooldown.Progress = 1;
Label.Visible = false;
UpdateIcons(); UpdateIcons();
} }