Skip to content

Commit

Permalink
Don't reset dialog height for in-game dialogs when window is resizable
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 3, 2023
1 parent 18e9bb9 commit 1f091bc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion EndlessClient/Dialogs/BaseEODialog.cs
Expand Up @@ -29,7 +29,7 @@ public override void CenterInGameView()
{
base.CenterInGameView();

if (_isInGame())
if (_isInGame() && !Game.Window.AllowUserResizing)
DrawPosition = new Vector2(DrawPosition.X, (330 - DrawArea.Height)/2f);
}
}
Expand Down
4 changes: 3 additions & 1 deletion EndlessClient/Dialogs/PaperdollDialog.cs
Expand Up @@ -130,7 +130,9 @@ public class PaperdollDialog : BaseEODialog
_rank.SetParentControl(this);

CenterInGameView();
DrawPosition = new Vector2(DrawPosition.X, 15);

if (!Game.Window.AllowUserResizing)
DrawPosition = new Vector2(DrawPosition.X, 15);

_paperdollData = Option.None<PaperdollData>();
}
Expand Down
4 changes: 3 additions & 1 deletion EndlessClient/Dialogs/ScrollingListDialog.cs
Expand Up @@ -273,7 +273,9 @@ public ScrollingListDialogButtons Buttons
Buttons = ScrollingListDialogButtons.AddCancel;

CenterInGameView();
DrawPosition = new Vector2(DrawPosition.X, 15);

if (!Game.Window.AllowUserResizing)
DrawPosition = new Vector2(DrawPosition.X, 15);
}

public void SetItemList(List<ListDialogItem> itemList)
Expand Down
4 changes: 3 additions & 1 deletion EndlessClient/Dialogs/SessionExpDialog.cs
Expand Up @@ -103,7 +103,9 @@ static SessionExpDialog()
Array.ForEach(rightSide, lbl => lbl.ResizeBasedOnText());

CenterInGameView();
DrawPosition = new Vector2(DrawPosition.X, 15);

if (!Game.Window.AllowUserResizing)
DrawPosition = new Vector2(DrawPosition.X, 15);
}

protected override void OnDrawControl(GameTime gameTime)
Expand Down

0 comments on commit 1f091bc

Please sign in to comment.