Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
andreakarasho committed Feb 2, 2020
2 parents dabebbf + 236404c commit 4f27d13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Game/UI/Gumps/SystemChatControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ private void ChatOnMessageReceived(object sender, UOMessageEventArgs e)
{
case MessageType.Regular when e.Parent == null || ! SerialHelper.IsValid(e.Parent.Serial):
case MessageType.System:
case MessageType.Label:
AddLine(e.Text, e.Font, e.Hue, e.IsUnicode);

break;
Expand Down
9 changes: 8 additions & 1 deletion src/Game/UI/Gumps/UseAbilityButtonGump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private void BuildGump()
};
Add(_button);

SetTooltip(ClilocLoader.Instance.GetString(1028838 + (byte) (((byte) (_isPrimary ? World.Player.PrimaryAbility : World.Player.SecondaryAbility) & 0x7F) - 1)), 80);
SetTooltip();

WantUpdateSize = true;
AcceptMouseInput = true;
Expand All @@ -74,6 +74,11 @@ private void BuildGump()
GroupMatrixHeight = 44;
}

private void SetTooltip()
{
SetTooltip(ClilocLoader.Instance.GetString(1028838 + (byte) (((byte) (_isPrimary ? World.Player.PrimaryAbility : World.Player.SecondaryAbility) & 0x7F) - 1)), 80);
}

protected override bool OnMouseDoubleClick(int x, int y, MouseButtonType button)
{
if (button == MouseButtonType.Left)
Expand Down Expand Up @@ -103,6 +108,8 @@ public override void Update(double totalMS, double frameMS)
{
_definition = def;
_button.Graphic = def.Icon;

SetTooltip();
}
}

Expand Down

0 comments on commit 4f27d13

Please sign in to comment.