|
@@ -24,12 +24,14 @@ import { attributes_z_index } from './attributes/attributes_z_index';
|
|
import { attributes_dir } from './attributes/attributes_dir';
|
|
import { attributes_dir } from './attributes/attributes_dir';
|
|
import { attributes_show } from './attributes/attributes_show';
|
|
import { attributes_show } from './attributes/attributes_show';
|
|
import { attributes_scene_setting } from './attributes/attributes_scene_setting';
|
|
import { attributes_scene_setting } from './attributes/attributes_scene_setting';
|
|
|
|
+import { attributes_remark } from './attributes/attributes_remark';
|
|
const { ccclass, property } = _decorator;
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('Attributes')
|
|
@ccclass('Attributes')
|
|
export class Attributes extends Component {
|
|
export class Attributes extends Component {
|
|
private attributes_map:Map<string,Node> = new Map
|
|
private attributes_map:Map<string,Node> = new Map
|
|
@property(Node) attributes_name:Node = null;
|
|
@property(Node) attributes_name:Node = null;
|
|
|
|
+ @property(Node) attributes_remark:Node = null;
|
|
@property(Node) attributes_x_y:Node = null;
|
|
@property(Node) attributes_x_y:Node = null;
|
|
@property(Node) attributes_w_h:Node = null;
|
|
@property(Node) attributes_w_h:Node = null;
|
|
@property(Node) attributes_res:Node = null;
|
|
@property(Node) attributes_res:Node = null;
|
|
@@ -59,6 +61,7 @@ export class Attributes extends Component {
|
|
ClientEvent.on(config.Event.UpdateAttributes,this.UpdateAttributes,this)
|
|
ClientEvent.on(config.Event.UpdateAttributes,this.UpdateAttributes,this)
|
|
ClientEvent.on(config.Event.ShowWidgetList,this.ShowWidgetList,this)
|
|
ClientEvent.on(config.Event.ShowWidgetList,this.ShowWidgetList,this)
|
|
this.attributes_map.set("name",this.attributes_name)
|
|
this.attributes_map.set("name",this.attributes_name)
|
|
|
|
+ this.attributes_map.set("remark",this.attributes_remark)
|
|
this.attributes_map.set("pos",this.attributes_x_y)
|
|
this.attributes_map.set("pos",this.attributes_x_y)
|
|
this.attributes_map.set("size",this.attributes_w_h)
|
|
this.attributes_map.set("size",this.attributes_w_h)
|
|
this.attributes_map.set("url",this.attributes_res)
|
|
this.attributes_map.set("url",this.attributes_res)
|
|
@@ -79,6 +82,7 @@ export class Attributes extends Component {
|
|
this.attributes_map.set("dir",this.attributes_dir)
|
|
this.attributes_map.set("dir",this.attributes_dir)
|
|
this.attributes_map.set("show",this.attributes_show)
|
|
this.attributes_map.set("show",this.attributes_show)
|
|
this.attributes_map.set("scene_set",this.attributes_scene_setting)
|
|
this.attributes_map.set("scene_set",this.attributes_scene_setting)
|
|
|
|
+ this.attributes_remark.getComponent(attributes_remark).initView(this.onChangeRemark.bind(this))
|
|
this.attributes_scene_setting.getComponent(attributes_scene_setting).initView(this.onChangSceneTipsRuleStatus.bind(this))
|
|
this.attributes_scene_setting.getComponent(attributes_scene_setting).initView(this.onChangSceneTipsRuleStatus.bind(this))
|
|
this.attributes_show.getComponent(attributes_show).initView(this.onChangShowStatus.bind(this))
|
|
this.attributes_show.getComponent(attributes_show).initView(this.onChangShowStatus.bind(this))
|
|
this.attributes_dir.getComponent(attributes_dir).initView(this.onChangeDir.bind(this))
|
|
this.attributes_dir.getComponent(attributes_dir).initView(this.onChangeDir.bind(this))
|
|
@@ -100,6 +104,11 @@ export class Attributes extends Component {
|
|
this.hideAllAtt()
|
|
this.hideAllAtt()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ onChangeRemark(text: string) {
|
|
|
|
+ this.cur_att_data.remark = text
|
|
|
|
+ ClientEvent.dispatchEvent(config.Event.UpdateAttributesToView,this.cur_att_data,config.attributes_list_type.remark)
|
|
|
|
+ }
|
|
|
|
+
|
|
onChangSceneTipsRuleStatus(data:scene_tips_rule_data){
|
|
onChangSceneTipsRuleStatus(data:scene_tips_rule_data){
|
|
this.cur_att_data.scene_rule_tips_data = data;
|
|
this.cur_att_data.scene_rule_tips_data = data;
|
|
ClientEvent.dispatchEvent(config.Event.UpdateAttributesToView,this.cur_att_data,config.attributes_list_type.scene_rule_tips)
|
|
ClientEvent.dispatchEvent(config.Event.UpdateAttributesToView,this.cur_att_data,config.attributes_list_type.scene_rule_tips)
|
|
@@ -207,6 +216,7 @@ export class Attributes extends Component {
|
|
this.showAllAtt()
|
|
this.showAllAtt()
|
|
this.attributes_map.get("scene_set").active = false;
|
|
this.attributes_map.get("scene_set").active = false;
|
|
if(data.type===config.attributes_type.widget){
|
|
if(data.type===config.attributes_type.widget){
|
|
|
|
+ this.attributes_map.get("remark").active = true;
|
|
this.attributes_map.get("drop").active = false;
|
|
this.attributes_map.get("drop").active = false;
|
|
this.attributes_map.get("click").active = false;
|
|
this.attributes_map.get("click").active = false;
|
|
this.attributes_map.get("slide").active = false;
|
|
this.attributes_map.get("slide").active = false;
|
|
@@ -256,6 +266,7 @@ export class Attributes extends Component {
|
|
}else if(data.type===config.attributes_type.scene){
|
|
}else if(data.type===config.attributes_type.scene){
|
|
this.hideAllAtt()
|
|
this.hideAllAtt()
|
|
this.attributes_map.get("name").active = true;
|
|
this.attributes_map.get("name").active = true;
|
|
|
|
+ this.attributes_map.get("remark").active = false;
|
|
this.attributes_map.get("size").active = true;
|
|
this.attributes_map.get("size").active = true;
|
|
this.attributes_map.get("url").active = true;
|
|
this.attributes_map.get("url").active = true;
|
|
this.attributes_map.get("animation").active = true;
|
|
this.attributes_map.get("animation").active = true;
|
|
@@ -275,6 +286,9 @@ export class Attributes extends Component {
|
|
let name = this.getNameCom()
|
|
let name = this.getNameCom()
|
|
name.update_att(`${this.cur_att_data.name}-id:${this.cur_att_data.id}`)
|
|
name.update_att(`${this.cur_att_data.name}-id:${this.cur_att_data.id}`)
|
|
|
|
|
|
|
|
+ let remark = this.getRemarkCom()
|
|
|
|
+ remark.update_att(this.cur_att_data.remark)
|
|
|
|
+
|
|
let pos = this.getPosCom()
|
|
let pos = this.getPosCom()
|
|
pos.update_att(this.cur_att_data.x,this.cur_att_data.y,this.cur_att_data.z)
|
|
pos.update_att(this.cur_att_data.x,this.cur_att_data.y,this.cur_att_data.z)
|
|
|
|
|
|
@@ -380,6 +394,10 @@ export class Attributes extends Component {
|
|
return this.attributes_map.get("name").getComponent(attributes_name);
|
|
return this.attributes_map.get("name").getComponent(attributes_name);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ getRemarkCom(){
|
|
|
|
+ return this.attributes_map.get("remark").getComponent(attributes_remark);
|
|
|
|
+ }
|
|
|
|
+
|
|
getPosCom(){
|
|
getPosCom(){
|
|
return this.attributes_map.get("pos").getComponent(attributes_x_y);
|
|
return this.attributes_map.get("pos").getComponent(attributes_x_y);
|
|
}
|
|
}
|