future 1 an în urmă
părinte
comite
8aa09ec6df

+ 2 - 0
assets/data/data.ts

@@ -81,6 +81,8 @@ export class att_drag_data{
     public is_err_drag_back:boolean = true; //拖拽错误是否回归原位
     public other_drag_list:att_drag_data[] = [];
     public other_widget_finish_listen_list:other_widget_finish_listen_item[] = [];
+    public remark:string = ''; //备注
+    public is_show_inTheEditor:boolean = true; //在编辑器中,是否显示
 }
 
 export class other_widget_finish_listen_item{

+ 21 - 21
assets/edit_game.scene

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

Fișier diff suprimat deoarece este prea mare
+ 429 - 220
assets/resources/prefab/task/other_drag_list_item.prefab


Fișier diff suprimat deoarece este prea mare
+ 273 - 134
assets/resources/prefab/widget_item.prefab


+ 23 - 1
assets/script/edit/attributes/other_drag_list_item.ts

@@ -1,4 +1,4 @@
-import { _decorator, Component, EditBox, Label, Node } from 'cc';
+import { _decorator, Component, EditBox, Label, Node, Toggle } from 'cc';
 import { att_drag_data, event_item } from '../../../data/data';
 import { Attributes } from '../Attributes';
 import { tools } from '../../tools';
@@ -15,6 +15,8 @@ export class other_drag_list_item extends Component {
     @property(Node) btn_finish_logic:Node = null;
     @property(Node) lab_finish_logic:Node = null;
     @property(Node) btn_delete:Node = null;
+    @property(EditBox) editBox_remark:EditBox = null;
+    @property(Node) btn_is_show:Node = null;
     private m_data:att_drag_data = null;
     private delete_call = null;
     public initView(data:att_drag_data,call){
@@ -39,6 +41,14 @@ export class other_drag_list_item extends Component {
 
         this.drag_x.node.on('editing-did-ended', this.change, this);
         this.drag_y.node.on('editing-did-ended', this.change, this);
+
+        this.editBox_remark.node.on('editing-did-ended', this.change, this);
+
+        this.btn_is_show.on('toggle', ()=> {
+            this.m_data.is_show_inTheEditor = !this.m_data.is_show_inTheEditor
+            // console.log('this.m_data.is_show_inTheEditor=',this.m_data.is_show_inTheEditor)
+            this.change()
+        }, this)
     }
     change(){
         this.m_data.drag_pos_x = parseInt(this.drag_x.string);
@@ -46,6 +56,8 @@ export class other_drag_list_item extends Component {
 
         this.m_data.drag_size_width = parseInt(this.drag_width.string);
         this.m_data.drag_size_height = parseInt(this.drag_height.string);
+
+        this.m_data.remark = this.editBox_remark.string;
        
         ClientEvent.dispatchEvent(config.Event.UpdateAttributesToView, Attributes.Singleton.get_cur_att_data(),config.attributes_list_type.drag)
     }
@@ -57,6 +69,16 @@ export class other_drag_list_item extends Component {
         this.drag_x.string = data.drag_pos_x.toString()
         this.drag_y.string = data.drag_pos_y.toString()
         this.lab_finish_logic.getComponent(Label).string = this.m_data.other_event_id==-1?"无":`id:${this.m_data.other_event_id}`
+
+        if(data.remark==undefined) {
+            data.remark = ''
+        }
+        this.editBox_remark.string = data.remark
+
+        if(data.is_show_inTheEditor==undefined) {
+            data.is_show_inTheEditor = true
+        }
+        this.btn_is_show.getComponent(Toggle).isChecked = data.is_show_inTheEditor
     }
 }
 

+ 4 - 0
assets/script/edit/widget_item.ts

@@ -141,6 +141,8 @@ export class widget_item extends Component {
                 this.m_att.drag_data.other_drag_list[index].drag_pos_y = item.position.y;
             })
             item.getComponent(Sprite).color = this.getOtherDragListColor(index) //Color.YELLOW
+            item.getChildByName('lab_drag_remark').getComponent(Label).string = element.remark
+            item.active = element.is_show_inTheEditor
         }
         this.lab_drag.getComponent(Label).string = `${this.m_data.name}id:${this.m_att.id}`
     }
@@ -431,6 +433,8 @@ export class widget_item extends Component {
                                 this.m_att.drag_data.other_drag_list[index].drag_pos_y = item.position.y;
                             })
                             item.getComponent(Sprite).color = this.getOtherDragListColor(index) //Color.YELLOW
+                            item.getChildByName('lab_drag_remark').getComponent(Label).string = element.remark
+                            item.active = element.is_show_inTheEditor
                         }
                     }
                 break;

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff