future 1 рік тому
батько
коміт
145abdac67
2 змінених файлів з 41 додано та 37 видалено
  1. 21 21
      assets/edit_game.scene
  2. 20 16
      assets/script/edit/scene_select_list.ts

+ 21 - 21
assets/edit_game.scene

@@ -116,7 +116,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 959.9999999999999,
+      "x": 960,
       "y": 960,
       "z": 0
     },
@@ -206,8 +206,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1919.9999999999998,
-      "height": 1919.9999999999998
+      "width": 1920,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -344,7 +344,7 @@
     "_priority": 0,
     "_fov": 45,
     "_fovAxis": 0,
-    "_orthoHeight": 959.9999999999999,
+    "_orthoHeight": 960,
     "_near": 0,
     "_far": 1000,
     "_color": {
@@ -533,8 +533,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 839.9999999999997,
-      "height": 1919.9999999999998
+      "width": 840,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7333,7 +7333,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -509.9999999999999,
+      "y": -510,
       "z": 0
     },
     "_lrot": {
@@ -7390,7 +7390,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 419.99999999999983,
+      "x": 420,
       "y": 0,
       "z": 0
     },
@@ -7790,7 +7790,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 799.9999999999997,
+      "width": 800,
       "height": 860
     },
     "_anchorPoint": {
@@ -7908,7 +7908,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -284.99999999999983,
+      "x": -285,
       "y": -105,
       "z": 0
     },
@@ -8191,7 +8191,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 799.9999999999997,
+      "width": 800,
       "height": 210
     },
     "_anchorPoint": {
@@ -8275,7 +8275,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 839.9999999999997,
+      "width": 840,
       "height": 900
     },
     "_anchorPoint": {
@@ -16616,8 +16616,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 839.9999999999997,
-      "height": 1919.9999999999998
+      "width": 840,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -18508,7 +18508,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 750.133,
+      "x": 750.1330000000002,
       "y": 0,
       "z": 0
     },
@@ -172633,8 +172633,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 419.99999999999943,
-      "height": 1869.9999999999998
+      "width": 419.9999999999998,
+      "height": 1870
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -172858,8 +172858,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 419.99999999999943,
-      "height": 1919.9999999999998
+      "width": 419.9999999999998,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -175476,8 +175476,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1919.9999999999998,
-      "height": 1919.9999999999998
+      "width": 1920,
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 20 - 16
assets/script/edit/scene_select_list.ts

@@ -49,22 +49,26 @@ export class scene_select_list extends Component {
     }
 
     onItemMoveClick(item:scene_select_list_item, is_up:boolean) {
-        // let list = this.m_main.control_view.get_bag_data().content;
-        // let c_index = item.getIndex()
-        // let c_data = list[c_index]
-        // let move_index=-1;
-        // if(is_up) {
-        //     move_index = c_index - 1
-        //     this.cur_select_index -=1
-        // } else {
-        //     move_index = c_index + 1
-        //     this.cur_select_index +=1
-        // }
-        // if(move_index == -1) {return}
-        // let move_data = list[move_index]
-        // list[c_index] = move_data
-        // list[move_index] = c_data
-        // this.onUpdateSceneList(true)
+        let list = this.m_main.control_view.get_bag_data().content;
+        let c_index = item.getIndex()
+        let c_data = list[c_index]
+        let move_index=-1;
+        if(is_up) {
+            move_index = c_index - 1
+            if(item.getSelect()) {
+                this.cur_select_index -=1
+            }
+        } else {
+            move_index = c_index + 1
+            if(item.getSelect()) {
+                this.cur_select_index +=1
+            }
+        }
+        if(move_index == -1) {return}
+        let move_data = list[move_index]
+        list[c_index] = move_data
+        list[move_index] = c_data
+        this.onUpdateSceneList(true)
     }
 
     updaetSelectStatus(){