@@ -82,7 +82,9 @@ public static GUISkin Skin
8282 }
8383 }
8484
85- public Vector2 MinimizedPosition => new Vector2 ( 42 - WindowRect . width , Screen . height - 400 ) ;
85+ private Vector2 MinimizedPosition => new Vector2 ( 42 - WindowRect . width , Screen . height - MinimizedHeight ) ;
86+
87+ public static float MinimizedHeight { get ; set ; }
8688 public static Vector2 Position { get ; set ; }
8789
8890 private static float DrawSlider ( string label , float value , float min , float max , string oldText , out string newText )
@@ -119,7 +121,13 @@ private void OnGUI()
119121 GUI . skin = Skin ;
120122 WindowRect = GUI . Window ( WindowID , WindowRect , DoWindow , "" , Elements . Windows . ClearDark ) ;
121123
122- if ( ! Minimized && ! Animating ) Position = WindowRect . position ;
124+ if ( ! Animating )
125+ {
126+ if ( ! Minimized )
127+ Position = WindowRect . position ;
128+ else
129+ MinimizedHeight = Screen . height - WindowRect . position . y ;
130+ }
123131 }
124132
125133 private void DoWindow ( int id )
@@ -131,6 +139,7 @@ private void DoWindow(int id)
131139 {
132140 var tmpScale = Scale ;
133141
142+ GUILayout . Label ( "<color=#888888><b>ADJUST BLOCK SCALE</b></color>" , new GUIStyle ( Elements . Labels . Default ) { alignment = TextAnchor . MiddleCenter } ) ;
134143 GUILayout . FlexibleSpace ( ) ;
135144 tmpScale . x = DrawSlider ( "<b>X</b>" , tmpScale . x , 0.1f , 3f , _xSliderString , out _xSliderString ) ;
136145 GUILayout . FlexibleSpace ( ) ;
@@ -171,8 +180,7 @@ private void DoWindow(int id)
171180 GUILayout . EndHorizontal ( ) ;
172181
173182 // Drag window
174- if ( ! Minimized )
175- GUI . DragWindow ( new Rect ( 0 , 0 , WindowRect . width , WindowRect . height ) ) ;
183+ GUI . DragWindow ( new Rect ( 0 , 0 , WindowRect . width , WindowRect . height ) ) ;
176184 }
177185
178186 private IEnumerator Restore ( )
0 commit comments