File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ protected override void EnsureInitialized()
173173 SizeToChildren ( recursive : true ) ;
174174
175175 LoadJsonUi ( GameContentManager . UI . Menu , Graphics . Renderer ? . GetResolutionString ( ) ) ;
176+ EnsureArrowsVisibility ( ) ;
176177 }
177178
178179 //Methods
@@ -340,6 +341,18 @@ public override void Show()
340341 _selectedCharacterIndex = 0 ;
341342 UpdateDisplay ( ) ;
342343 base . Show ( ) ;
344+ EnsureArrowsVisibility ( ) ;
345+ }
346+
347+ private void EnsureArrowsVisibility ( )
348+ {
349+ // in case the json load is changing the visibility of the arrows when it shouldn't
350+ // lets ensure the right value
351+ if ( CharacterSelectionPreviews != default )
352+ {
353+ _selectCharacterRightButton . IsHidden = CharacterSelectionPreviews . Length <= 1 ;
354+ _selectCharacterLeftButton . IsHidden = CharacterSelectionPreviews . Length <= 1 ;
355+ }
343356 }
344357
345358 private void _buttonLogout_Clicked ( Base sender , MouseButtonState arguments )
@@ -435,4 +448,4 @@ public void ButtonPlay_Clicked(Base? sender, MouseButtonState? arguments)
435448 _buttonDelete . Disable ( ) ;
436449 _buttonLogout . Disable ( ) ;
437450 }
438- }
451+ }
You can’t perform that action at this time.
0 commit comments