@@ -319,35 +319,13 @@ private void RenderMappingList(List<string> controllerList)
319
319
GUIStyle headerStyle = new GUIStyle ( ) ;
320
320
headerStyle . richText = true ;
321
321
322
- if ( currentControllerOption == null || currentControllerTexture == null )
322
+ using ( new EditorGUILayout . VerticalScope ( ) )
323
323
{
324
- using ( new EditorGUILayout . VerticalScope ( ) )
325
- {
326
- GUILayout . FlexibleSpace ( ) ;
327
- EditorGUILayout . LabelField ( "<b>Controllers affected by this mapping</b>" , headerStyle ) ;
328
- for ( int i = 0 ; i < controllerList . Count ; i ++ )
329
- {
330
- EditorGUILayout . LabelField ( controllerList [ i ] ) ;
331
- }
332
- }
333
- }
334
- else
335
- {
336
- float max_y = currentControllerOption . InputLabelPositions . Max ( x => x . y ) ;
337
-
338
- var titleRectPosition = Vector2 . up * ( max_y + 4 * EditorGUIUtility . singleLineHeight ) ;
339
- var titleRectSize = new Vector2 ( 500 , EditorGUIUtility . singleLineHeight ) ;
340
-
341
- var titleRect = new Rect ( titleRectPosition , titleRectSize ) ;
342
- EditorGUI . LabelField ( titleRect , "<b>Controllers affected by this mapping</b>" , headerStyle ) ;
343
-
324
+ GUILayout . FlexibleSpace ( ) ;
325
+ EditorGUILayout . LabelField ( "<b>Controllers affected by this mapping</b>" , headerStyle ) ;
344
326
for ( int i = 0 ; i < controllerList . Count ; i ++ )
345
327
{
346
- var rectPosition = Vector2 . up * ( max_y + ( i + 5 ) * EditorGUIUtility . singleLineHeight ) ;
347
- var rectSize = new Vector2 ( 1000 , EditorGUIUtility . singleLineHeight ) ;
348
-
349
- var labelRect = new Rect ( rectPosition , rectSize ) ;
350
- EditorGUI . LabelField ( labelRect , controllerList [ i ] ) ;
328
+ EditorGUILayout . LabelField ( controllerList [ i ] ) ;
351
329
}
352
330
}
353
331
}
0 commit comments