@@ -199,21 +199,14 @@ public static void DrawTexture(Rect rect, Texture texture, ScaleMode scaleMode,
199199 GUI . DrawTexture ( rect , texture , scaleMode , alphaBlend ) ;
200200 }
201201
202- public static void DrawMinMaxSlider ( Rect rect , string label , ref float xValue , ref float yValue , float minValue , float maxValue )
202+ public static void DrawMinMaxSlider ( Rect rect , ref float xValue , ref float yValue , float minValue , float maxValue )
203203 {
204- DrawMinMaxSlider ( rect , new GUIContent ( label ) , ref xValue , ref yValue , minValue , maxValue ) ;
205- }
206-
207- public static void DrawMinMaxSlider ( Rect rect , GUIContent label , ref float xValue , ref float yValue , float minValue , float maxValue )
208- {
209- rect = EditorGUI . PrefixLabel ( rect , label ) ;
210-
211204 var fieldWidth = EditorGUIUtility . fieldWidth ;
212205 var minFieldRect = new Rect ( rect . xMin , rect . y , fieldWidth , rect . height ) ;
213206 var maxFieldRect = new Rect ( rect . xMax - fieldWidth , rect . y , fieldWidth , rect . height ) ;
214207
215208 //set slider rect between min and max fields + additional padding
216- var spacing = 8.0f ;
209+ const float spacing = 8.0f ;
217210 var sliderRect = Rect . MinMaxRect ( minFieldRect . xMax + spacing ,
218211 rect . yMin ,
219212 maxFieldRect . xMin - spacing ,
@@ -229,6 +222,17 @@ public static void DrawMinMaxSlider(Rect rect, GUIContent label, ref float xValu
229222 yValue = Mathf . Clamp ( yValue , Mathf . Max ( minValue , xValue ) , maxValue ) ;
230223 }
231224
225+ public static void DrawMinMaxSlider ( Rect rect , string label , ref float xValue , ref float yValue , float minValue , float maxValue )
226+ {
227+ DrawMinMaxSlider ( rect , new GUIContent ( label ) , ref xValue , ref yValue , minValue , maxValue ) ;
228+ }
229+
230+ public static void DrawMinMaxSlider ( Rect rect , GUIContent label , ref float xValue , ref float yValue , float minValue , float maxValue )
231+ {
232+ rect = EditorGUI . PrefixLabel ( rect , label ) ;
233+ DrawMinMaxSlider ( rect , ref xValue , ref yValue , minValue , maxValue ) ;
234+ }
235+
232236 public static void BoldLabel ( Rect rect , string label )
233237 {
234238 BoldLabel ( rect , new GUIContent ( label ) ) ;
0 commit comments