1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- import { _decorator, Label, Node, tween, UIOpacity } from 'cc';
- import { BaseView } from '../../../framework/layer/BaseView';
- import { StringUtil } from '../../../framework/util/StringUtil';
- import { ItemEnum } from '../../common/InterfaceAddEnum';
- import { Framework } from '../../../framework/Framework';
- const { ccclass, property } = _decorator;
- @ccclass('ItemMsg')
- export class ItemMsg extends BaseView {
- @property({ type: Label, tooltip: "关闭提示" })
- closeTips: Label = null;
- @property({ type: Label, tooltip: "标题" })
- titleTx: Label = null;
- @property({ type: Node, tooltip: "标题区域" })
- titleNode: Node = null;
- @property({ type: Node, tooltip: "基础信息区域" })
- msgNode: Node = null;
- @property({ type: Node, tooltip: "描述区域" })
- descNode: Node = null;
- @property({ type: Node, tooltip: "属性展示区域" })
- attrNode: Node = null;
- @property({ type: Node, tooltip: "批量操作区域" })
- batchNode: Node = null;
- @property({ type: Node, tooltip: "操作区域" })
- operateNode: Node = null;
- protected onLoad() {
- super.onLoad();
- this.closeTips.string = StringUtil.getLanguageData('点击空白关闭');
- this.closeTips.node.getComponent(UIOpacity).opacity = 0;
- }
- protected onDestroy() {
-
- }
-
- onOpen(data) {
- tween(this.closeTips.node.getComponent(UIOpacity))
- .to(1, { opacity: 255 })
- .to(1.2, { opacity: 10 })
- .union()
- .repeatForever()
- .start()
- if(data.type == ItemEnum.material){
- }else if(data.type == ItemEnum.equip){
- }
- }
-
- onClose() {
- }
-
-
- onShow() {
- super.onShow();
- }
-
-
- onHide() {
- super.onHide();
- }
-
- private onTouchButton(event: Event) {
-
- let target: any = event.target;
- if (target.name == 'mask') {
- Framework.layer.close(this);
- }
- }
- }
|