@@ -81,23 +81,23 @@ private void OnEnable()
81
81
public override void OnInspectorGUI ( )
82
82
{
83
83
// game dropdown
84
- _gle . romId = EditorGUILayout . TextField ( "ROM ID" , _gle . romId ) ;
85
-
86
- // EditorGUI.BeginChangeCheck();
87
- // _selectedGameIndex = EditorGUILayout.Popup("Game", _selectedGameIndex, _gameNames);
88
- // if (EditorGUI.EndChangeCheck()) {
89
- // _selectedRomIndex = 0;
90
- // if (_selectedGameIndex > 0) {
91
- // _gle.Game = _games[_selectedGameIndex - 1];
92
- // _gle.romId = Rom.Id;
93
- // _romNames = _gle.Game.Roms.Select(g => g.ToString()).ToArray();
94
- //
95
- // } else {
96
- // _gle.Game = null;
97
- // _gle.romId = string.Empty;
98
- // _romNames = new string[0];
99
- // }
100
- // }
84
+ // _gle.romId = EditorGUILayout.TextField("ROM ID", _gle.romId);
85
+
86
+ EditorGUI . BeginChangeCheck ( ) ;
87
+ _selectedGameIndex = EditorGUILayout . Popup ( "Game" , _selectedGameIndex , _gameNames ) ;
88
+ if ( EditorGUI . EndChangeCheck ( ) ) {
89
+ _selectedRomIndex = 0 ;
90
+ if ( _selectedGameIndex > 0 ) {
91
+ _gle . Game = _games [ _selectedGameIndex - 1 ] ;
92
+ _gle . romId = Rom . Id ;
93
+ _romNames = _gle . Game . Roms . Select ( g => g . ToString ( ) ) . ToArray ( ) ;
94
+
95
+ } else {
96
+ _gle . Game = null ;
97
+ _gle . romId = string . Empty ;
98
+ _romNames = new string [ 0 ] ;
99
+ }
100
+ }
101
101
102
102
// rom dropdown
103
103
EditorGUI . BeginDisabledGroup ( _gle . Game == null ) ;
0 commit comments