@@ -104,8 +104,8 @@ public static void Postfix_Ready(NModMenuRow __instance)
104104
105105 container . AddChild ( groupDropdown ) ;
106106
107- __instance . Resized += ( ) => UpdateCustomControlsLayout ( __instance , container , groupDropdown ) ;
108- Callable . From ( ( ) => UpdateCustomControlsLayout ( __instance , container , groupDropdown ) ) . CallDeferred ( ) ;
107+ __instance . Resized += ( ) => UpdateCustomControlsLayout ( __instance , container , upBtn , downBtn , groupDropdown ) ;
108+ Callable . From ( ( ) => UpdateCustomControlsLayout ( __instance , container , upBtn , downBtn , groupDropdown ) ) . CallDeferred ( ) ;
109109 }
110110
111111 internal static void RefreshVisibleModNames ( NModdingScreen screen )
@@ -347,7 +347,12 @@ private static void RemoveColoredNameLabel(Node root)
347347 return null ;
348348 }
349349
350- private static void UpdateCustomControlsLayout ( NModMenuRow row , HBoxContainer container , OptionButton groupDropdown )
350+ private static void UpdateCustomControlsLayout (
351+ NModMenuRow row ,
352+ HBoxContainer container ,
353+ Button upButton ,
354+ Button downButton ,
355+ OptionButton groupDropdown )
351356 {
352357 if ( ! GodotObject . IsInstanceValid ( row ) || ! GodotObject . IsInstanceValid ( container ) )
353358 return ;
@@ -361,6 +366,15 @@ private static void UpdateCustomControlsLayout(NModMenuRow row, HBoxContainer co
361366 groupDropdown . CustomMinimumSize = new Vector2 ( ModdingScreenConstants . RowDropdownCompactWidth , ModdingScreenConstants . ToolbarControlHeight ) ;
362367 }
363368
369+ upButton . Visible = true ;
370+ downButton . Visible = true ;
371+ float compactControlsWidth = container . GetCombinedMinimumSize ( ) . X ;
372+ bool showMoveButtons = ModdingScreenLayoutRules . ShouldShowRowMoveButtons ( row . Size . X , compactControlsWidth ) ;
373+ upButton . Visible = showMoveButtons ;
374+ downButton . Visible = showMoveButtons ;
375+ if ( ! showMoveButtons )
376+ groupDropdown . CustomMinimumSize = new Vector2 ( ModdingScreenConstants . RowDropdownNarrowWidth , ModdingScreenConstants . ToolbarControlHeight ) ;
377+
364378 float width = container . GetCombinedMinimumSize ( ) . X ;
365379 float height = container . GetCombinedMinimumSize ( ) . Y ;
366380 container . SetAnchorsPreset ( Control . LayoutPreset . CenterRight ) ;
0 commit comments