future 1 年之前
父节点
当前提交
7aae39a7f4

+ 382 - 27
assets/resources/prefab/widget_item.prefab

@@ -35,19 +35,25 @@
       },
       {
         "__id__": 82
+      },
+      {
+        "__id__": 106
+      },
+      {
+        "__id__": 112
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 112
+        "__id__": 126
       },
       {
-        "__id__": 114
+        "__id__": 128
       }
     ],
     "_prefab": {
-      "__id__": 116
+      "__id__": 130
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1903,19 +1909,16 @@
       },
       {
         "__id__": 89
-      },
-      {
-        "__id__": 103
       }
     ],
     "_active": false,
     "_components": [
       {
-        "__id__": 109
+        "__id__": 103
       }
     ],
     "_prefab": {
-      "__id__": 111
+      "__id__": 105
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2427,31 +2430,72 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 82
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 104
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "22guQs3uZJu5ZQpKf62nfY"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "8bKgWq7ahMG5WjpPHmKR/z",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
   {
     "__type__": "cc.Node",
     "_name": "lab_remark",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 82
+      "__id__": 1
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 104
+        "__id__": 107
       },
       {
-        "__id__": 106
+        "__id__": 109
       }
     ],
     "_prefab": {
-      "__id__": 108
+      "__id__": 111
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -102,
+      "y": -54.64200000000005,
       "z": 0
     },
     "_lrot": {
@@ -2483,11 +2527,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 103
+      "__id__": 106
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 105
+      "__id__": 108
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2511,11 +2555,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 103
+      "__id__": 106
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 107
+      "__id__": 110
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -2530,7 +2574,7 @@
     "_string": "备注",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 19,
+    "_actualFontSize": 21,
     "_fontSize": 20,
     "_fontFamily": "Arial",
     "_lineHeight": 40,
@@ -2563,22 +2607,129 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_look_voice_text",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 113
+      }
+    ],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 119
+      },
+      {
+        "__id__": 121
+      },
+      {
+        "__id__": 123
+      }
+    ],
+    "_prefab": {
+      "__id__": 125
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 70,
+      "y": -84,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 512,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 112
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 114
+      },
+      {
+        "__id__": 116
+      }
+    ],
+    "_prefab": {
+      "__id__": 118
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 82
+      "__id__": 113
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 110
+      "__id__": 115
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 100,
-      "height": 100
+      "width": 60,
+      "height": 30
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2589,7 +2740,52 @@
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "22guQs3uZJu5ZQpKf62nfY"
+    "fileId": "daqkvIdrRIP5zB4+4kU/NE"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 113
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 117
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_string": "语音文本",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 15,
+    "_fontSize": 15,
+    "_fontFamily": "Arial",
+    "_lineHeight": 20,
+    "_overflow": 1,
+    "_enableWrapText": false,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "4d+87LldZEVbLg6R4V5hcp"
   },
   {
     "__type__": "cc.PrefabInfo",
@@ -2599,7 +2795,163 @@
     "asset": {
       "__id__": 0
     },
-    "fileId": "8bKgWq7ahMG5WjpPHmKR/z",
+    "fileId": "26K4a5HilG87NxJo3LraSO",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 112
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 120
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 60,
+      "height": 30
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "87YnuiDKxMpbZFGb7CulMS"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 112
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 122
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "dfIUhNQgVDZI22wUokiYTi"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 112
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 124
+    },
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 0,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_normalSprite": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_hoverSprite": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_pressedSprite": {
+      "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_disabledSprite": {
+      "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_duration": 0.1,
+    "_zoomScale": 1.2,
+    "_target": {
+      "__id__": 112
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "c1CvGoEF1IH5ALTNmyGuzB"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "99vgWT6kxO+o54ngLTMxxm",
     "instance": null,
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
@@ -2614,7 +2966,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 113
+      "__id__": 127
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -2642,7 +2994,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 115
+      "__id__": 129
     },
     "lab_name": {
       "__id__": 17
@@ -2688,7 +3040,10 @@
       "__id__": 2
     },
     "lab_remark": {
-      "__id__": 103
+      "__id__": 106
+    },
+    "btn_look_voice_text": {
+      "__id__": 112
     },
     "_id": ""
   },

+ 1 - 1
assets/script/edit/event/edit_event_view.ts

@@ -141,7 +141,7 @@ export class edit_event_view extends Component {
         if(isSearchID) {
             this.searchData(parseInt(string))
         } else {
-            let check_yes = false
+            let check_yes = false 
             let list = Attributes.Singleton.getEventList()
             for(let i=0; i<list.length; i++) {
                 const element = list[i]

+ 1 - 3
assets/script/edit/scene_select_list.ts

@@ -83,9 +83,7 @@ export class scene_select_list extends Component {
         let list = this.m_main.control_view.get_bag_data().content;
         let c_data = list[c_index]
         // console.log('c_data=',c_data)
-        tools.show_copy_scene(c_data.scene_diy_name, (scene_name:string, copy_scene_view:copy_scene)=> { 
-            tools.showToast('暂未开放 暂未开放 暂未开放')
-            return           
+        tools.show_copy_scene(c_data.scene_diy_name, (scene_name:string, copy_scene_view:copy_scene)=> {          
             let copy_data = JSON.parse(JSON.stringify(c_data))  //深拷贝
             copy_data.scene_diy_name = scene_name
             for(let i=0; i<copy_data.page_list.length; i++) {

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

@@ -28,6 +28,7 @@ export class widget_item extends Component {
     @property(Node) toggle_check:Node = null;
     @property(Node) other_drag_content:Node = null;
     @property(Node) lab_remark:Node = null;
+    @property(Node) btn_look_voice_text:Node = null;
     private m_data:widget_item_data = null;
     private m_att:attributes_data = null;
     private isMove:boolean = false;
@@ -41,6 +42,17 @@ 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
+        }
+
         if(data.att!=null){
             this.call_back = call
             if(cur_select_id===null){
@@ -52,12 +64,6 @@ export class widget_item extends Component {
                         this.call_back(this.m_data)
                     }
                 })
-                this.lab_remark.getComponent(Label).string = this.m_data.att.remark
-                this.lab_name.on(Node.EventType.TOUCH_END, ()=> {
-                    if(this.m_data.type===config.Widget_Type_List.TEXT_SOUND){
-                        tools.show_dialog(this.m_data.att.text_sound_data.text, null)
-                    }
-                },this)
             }else{
                 this.node.on(Node.EventType.TOUCH_END,()=>{
                     if(this.call_back!=null){