|
|
@@ -114,9 +114,9 @@ public class GameMapEditor : EditorWindow
|
|
|
private static readonly GUIContent GC_MapSelect = new GUIContent("-select-");
|
|
|
private static readonly GUIContent GC_EditorHead = new GUIContent("Editor");
|
|
|
private static readonly GUIContent GC_AssetHead = new GUIContent("Asset");
|
|
|
- private static readonly GUIContent GC_MapHead = new GUIContent("Map");
|
|
|
- private static readonly GUIContent GC_LayersHead = new GUIContent("Layers");
|
|
|
- private static readonly GUIContent GC_TilesHead = new GUIContent("Tiles");
|
|
|
+ private static readonly GUIContent GC_MapHead = new GUIContent("关卡");
|
|
|
+ private static readonly GUIContent GC_LayersHead = new GUIContent("波次");
|
|
|
+ private static readonly GUIContent GC_TilesHead = new GUIContent("兵种");
|
|
|
private static readonly GUIContent GC_new = new GUIContent("new");
|
|
|
private static readonly GUIContent GC_rename = new GUIContent("ren", "Rename");
|
|
|
private static readonly GUIContent GC_apply = new GUIContent("apply");
|
|
|
@@ -801,7 +801,41 @@ public class GameMapEditor : EditorWindow
|
|
|
EditorGUILayout.BeginHorizontal();
|
|
|
{
|
|
|
// 切换图层可见性
|
|
|
+ bool altPressed = Event.current.alt;
|
|
|
+ bool shiftPressed = Event.current.shift;
|
|
|
+ bool isHidden = layerHidden[idx + 1];
|
|
|
layerHidden[idx + 1] = !GUILayout.Toggle(!layerHidden[idx + 1], GC_Viz, EditorStyles.miniButton, GUILayout.Width(25));
|
|
|
+ if (isHidden != layerHidden[idx + 1])
|
|
|
+ {
|
|
|
+ if (altPressed)
|
|
|
+ {
|
|
|
+ // 如果Alt键被按住,隐藏所有其他图层
|
|
|
+ if (isHidden != layerHidden[idx + 1])
|
|
|
+ {
|
|
|
+ for (int i = 1; i < layerHidden.Length; i++)
|
|
|
+ {
|
|
|
+ layerHidden[i] = true;
|
|
|
+ }
|
|
|
+ layerHidden[idx + 1] = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (shiftPressed)
|
|
|
+ {
|
|
|
+ if (isHidden != layerHidden[idx + 1])
|
|
|
+ {
|
|
|
+ for (int i = 1; i < layerHidden.Length; i++)
|
|
|
+ {
|
|
|
+ layerHidden[i] = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // 正常情况下的行为
|
|
|
+ layerHidden[idx + 1] = !GUILayout.Toggle(!layerHidden[idx + 1], GC_Viz, EditorStyles.miniButton, GUILayout.Width(25));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 选择图层
|
|
|
if (GUILayout.Toggle((idx == currLayer), asset.maps[mapIdx].layers[idx].name, EditorStyles.miniButton))
|