Skip to content

Commit

Permalink
Fix ListDialogItem click causing hyperlinks to be clicked twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Apr 6, 2022
1 parent 722530a commit dc51324
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions EndlessClient/Dialogs/ListDialogItem.cs
Expand Up @@ -223,10 +223,8 @@ protected override void OnUpdateControl(GameTime gameTime)
else if(CurrentMouseState.LeftButton == ButtonState.Released &&
PreviousMouseState.LeftButton == ButtonState.Pressed)
{
// todo: this might cause the click event to be fired twice, need to double check it
if (_subText is XNAHyperLink && _subText.MouseOver)
((XNAHyperLink)_subText).Click();
else
if ((_subText is IXNAHyperLink && !_subText.MouseOver) ||
(_primaryText is IXNAHyperLink && !_primaryText.MouseOver))
LeftClick?.Invoke(this, EventArgs.Empty);

_parentList.ChildControlClickHandled = true;
Expand Down

0 comments on commit dc51324

Please sign in to comment.