Skip to content

Commit

Permalink
Fix update bug in StatusBarLabel where status bar wouldn't show the s…
Browse files Browse the repository at this point in the history
…ame text twice
  • Loading branch information
ethanmoffat committed Mar 23, 2022
1 parent f5b03b2 commit fde266c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion EndlessClient/HUD/StatusLabelSetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void SetStatusLabel(EOResourceID type, string prepended, EOResourceID tex

private void SetStatusLabelText(string type, string text, string extra = "")
{
_statusLabelTextRepository.StatusText = $"[ {type} ] {text} {extra}";
_statusLabelTextRepository.StatusText = $"[ {type} ] {text}{extra}";
_statusLabelTextRepository.SetTime = DateTime.Now;
}

Expand Down
3 changes: 3 additions & 0 deletions EndlessClient/UIControls/StatusBarLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ protected override bool ShouldUpdate()
}

if ((DateTime.Now - _statusLabelTextProvider.SetTime).TotalMilliseconds > STATUS_LABEL_DISPLAY_TIME_MS)
{
Text = string.Empty;
Visible = false;
}

return base.ShouldUpdate();
}
Expand Down

0 comments on commit fde266c

Please sign in to comment.