future hai 1 ano
pai
achega
040b06e72d
Modificáronse 3 ficheiros con 34 adicións e 32 borrados
  1. 21 21
      assets/edit_game.scene
  2. 12 10
      assets/script/edit/widget_item.ts
  3. 1 1
      assets/script/edit/widget_list.ts

+ 21 - 21
assets/edit_game.scene

@@ -116,8 +116,8 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 960.0000000000001,
-      "y": 960.0000000000002,
+      "x": 959.9999999999999,
+      "y": 960,
       "z": 0
     },
     "_lrot": {
@@ -206,8 +206,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1920.0000000000002,
-      "height": 1920.0000000000002
+      "width": 1919.9999999999998,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -344,7 +344,7 @@
     "_priority": 0,
     "_fov": 45,
     "_fovAxis": 0,
-    "_orthoHeight": 960.0000000000001,
+    "_orthoHeight": 959.9999999999999,
     "_near": 0,
     "_far": 1000,
     "_color": {
@@ -533,8 +533,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840.0000000000001,
-      "height": 1920.0000000000002
+      "width": 839.9999999999997,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7333,7 +7333,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -510.0000000000001,
+      "y": -509.9999999999999,
       "z": 0
     },
     "_lrot": {
@@ -7390,7 +7390,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 420.00000000000006,
+      "x": 419.99999999999983,
       "y": 0,
       "z": 0
     },
@@ -7790,7 +7790,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 800.0000000000001,
+      "width": 799.9999999999997,
       "height": 860
     },
     "_anchorPoint": {
@@ -7908,7 +7908,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -285.00000000000006,
+      "x": -284.99999999999983,
       "y": -105,
       "z": 0
     },
@@ -8191,7 +8191,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 800.0000000000001,
+      "width": 799.9999999999997,
       "height": 210
     },
     "_anchorPoint": {
@@ -8275,7 +8275,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840.0000000000001,
+      "width": 839.9999999999997,
       "height": 900
     },
     "_anchorPoint": {
@@ -16616,8 +16616,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840.0000000000001,
-      "height": 1920.0000000000002
+      "width": 839.9999999999997,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -172633,8 +172633,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 419.9999999999999,
-      "height": 1870.0000000000002
+      "width": 419.99999999999943,
+      "height": 1869.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -172858,8 +172858,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 419.9999999999999,
-      "height": 1920.0000000000002
+      "width": 419.99999999999943,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -175476,8 +175476,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1920.0000000000002,
-      "height": 1920.0000000000002
+      "width": 1919.9999999999998,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 12 - 10
assets/script/edit/widget_item.ts

@@ -42,18 +42,20 @@ export class widget_item extends Component {
     public initView(data:widget_item_data,call=null,cur_select_id:number=-1){
         this.m_data = data;
         this.lab_name.getComponent(Label).string = data.name + (this.m_data.att?`id:${this.m_data.att.id}`:"");
-        this.lab_remark.getComponent(Label).string = this.m_data.att.remark
-        if(this.m_data.type==config.Widget_Type_List.TEXT_SOUND) {
-            this.btn_look_voice_text.active = true
-            this.btn_look_voice_text.off(Node.EventType.TOUCH_END)
-            this.btn_look_voice_text.on(Node.EventType.TOUCH_END, ()=> {
-                tools.show_dialog(this.m_data.att.text_sound_data.text, null)
-            },this)
-        } else {
-            this.btn_look_voice_text.active = false
-        }
+        this.lab_remark.getComponent(Label).string = ''
 
         if(data.att!=null){
+            this.lab_remark.getComponent(Label).string = this.m_data.att.remark
+            if(this.m_data.type==config.Widget_Type_List.TEXT_SOUND) {
+                this.btn_look_voice_text.active = true
+                this.btn_look_voice_text.off(Node.EventType.TOUCH_END)
+                this.btn_look_voice_text.on(Node.EventType.TOUCH_END, ()=> {
+                    tools.show_dialog(this.m_data.att.text_sound_data.text, null)
+                },this)
+            } else {
+                this.btn_look_voice_text.active = false
+            }
+
             this.call_back = call
             if(cur_select_id===null){
                 this.toggle_active.active = true;

+ 1 - 1
assets/script/edit/widget_list.ts

@@ -5,7 +5,7 @@ const { ccclass, property } = _decorator;
 
 @ccclass('widget_list')
 export class widget_list extends Component {
-    @property(Prefab) item_prefab
+    @property(Prefab) item_prefab:Prefab = null;
     protected start(): void {
         this.initView()
     }