|
|
@@ -60,37 +60,37 @@ public class GameMapEdPopup : PopupWindowContent
|
|
|
}
|
|
|
|
|
|
GUI.Label(r, GC_Head, EditorStyles.boldLabel);
|
|
|
- r.x = r.xMax - 25; r.width = 25;
|
|
|
- GUI.enabled = list.index >= 0;
|
|
|
- if (GUI.Button(r, GC_Rem, EditorStyles.miniButtonRight))
|
|
|
- {
|
|
|
- if (list.index >= 0 && list.index < Asset.maps.Count)
|
|
|
- {
|
|
|
- Undo.RecordObject(Asset, "Remove Game Map");
|
|
|
- int key = list.index;
|
|
|
- Asset.RemoveMapAtIndex(list.index);
|
|
|
- ChangeContentRect();
|
|
|
- if(key == 0)
|
|
|
- {
|
|
|
- OnMapSelected(0);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- OnMapSelected(key - 1);
|
|
|
- }
|
|
|
+ //r.x = r.xMax - 25; r.width = 25;
|
|
|
+ //GUI.enabled = list.index >= 0;
|
|
|
+ //if (GUI.Button(r, GC_Rem, EditorStyles.miniButtonRight))
|
|
|
+ //{
|
|
|
+ // if (list.index >= 0 && list.index < Asset.maps.Count)
|
|
|
+ // {
|
|
|
+ // Undo.RecordObject(Asset, "Remove Game Map");
|
|
|
+ // int key = list.index;
|
|
|
+ // Asset.RemoveMapAtIndex(list.index);
|
|
|
+ // ChangeContentRect();
|
|
|
+ // if(key == 0)
|
|
|
+ // {
|
|
|
+ // OnMapSelected(0);
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // OnMapSelected(key - 1);
|
|
|
+ // }
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- GUI.enabled = true;
|
|
|
- r.x -= 25;
|
|
|
- if (GUI.Button(r, GC_Add, EditorStyles.miniButtonLeft))
|
|
|
- {
|
|
|
- Undo.RecordObject(Asset, "Add Game Map");
|
|
|
- Asset.AddMap();
|
|
|
- ChangeContentRect();
|
|
|
- OnMapSelected(Asset.maps.Count - 1);
|
|
|
- }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+
|
|
|
+ //GUI.enabled = true;
|
|
|
+ //r.x -= 25;
|
|
|
+ //if (GUI.Button(r, GC_Add, EditorStyles.miniButtonLeft))
|
|
|
+ //{
|
|
|
+ // Undo.RecordObject(Asset, "Add Game Map");
|
|
|
+ // Asset.AddMap();
|
|
|
+ // ChangeContentRect();
|
|
|
+ // OnMapSelected(Asset.maps.Count - 1);
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
private void DrawElement(Rect r, int index, bool isActive, bool isFocused)
|
|
|
@@ -110,7 +110,7 @@ public class GameMapEdPopup : PopupWindowContent
|
|
|
|
|
|
public void ChangeMapSelected(int id)
|
|
|
{
|
|
|
- OnMapSelected(id);
|
|
|
+ OnMapSelected(0);
|
|
|
}
|
|
|
|
|
|
// ----------------------------------------------------------------------------------------------------------------
|