|
@@ -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
|
|
|
}
|
|
|
}
|
|
|
|