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