Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Intersect.Client.Core/Interface/Menu/SelectCharacterWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ protected override void EnsureInitialized()
SizeToChildren(recursive: true);

LoadJsonUi(GameContentManager.UI.Menu, Graphics.Renderer?.GetResolutionString());
EnsureArrowsVisibility();
}

//Methods
Expand Down Expand Up @@ -340,6 +341,18 @@ public override void Show()
_selectedCharacterIndex = 0;
UpdateDisplay();
base.Show();
EnsureArrowsVisibility();
}

private void EnsureArrowsVisibility()
{
// in case the json load is changing the visibility of the arrows when it shouldn't
// lets ensure the right value
if (CharacterSelectionPreviews != default)
{
_selectCharacterRightButton.IsHidden = CharacterSelectionPreviews.Length <= 1;
_selectCharacterLeftButton.IsHidden = CharacterSelectionPreviews.Length <= 1;
}
}

private void _buttonLogout_Clicked(Base sender, MouseButtonState arguments)
Expand Down Expand Up @@ -435,4 +448,4 @@ public void ButtonPlay_Clicked(Base? sender, MouseButtonState? arguments)
_buttonDelete.Disable();
_buttonLogout.Disable();
}
}
}
Loading