update
This commit is contained in:
@@ -6,6 +6,12 @@ import {ViewManager} from "db://assets/Scripts/Main/Manager/ViewManager";
|
||||
import {GButton} from "db://assets/Scripts/Main/Common/GButton";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
interface ShowPanelData
|
||||
{
|
||||
url: string;
|
||||
closeFunc:Function;
|
||||
}
|
||||
|
||||
@ccclass('ShowPanel')
|
||||
export class ShowPanel extends li_BaseView {
|
||||
@property(Sprite)
|
||||
@@ -13,18 +19,34 @@ export class ShowPanel extends li_BaseView {
|
||||
@property(Sprite)
|
||||
splash:Sprite;
|
||||
|
||||
url:string;
|
||||
func:Function;
|
||||
openUIDataCT(data:ShowPanelData) {
|
||||
super.openUIDataCT(data);
|
||||
this.url = data.url;
|
||||
this.func = data.closeFunc;
|
||||
}
|
||||
|
||||
onLoadCT() {
|
||||
this.show("Image/1/naked_1");
|
||||
this.show(this.url);
|
||||
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
//this.splash.node.on(Node.EventType.TOUCH_START,this.onclickback);
|
||||
GButton.BandClick(this.splash.node,()=>{this.close()},this);
|
||||
GButton.BandClick(this.splash.node,this.onClose,this);
|
||||
}
|
||||
|
||||
|
||||
protected onClose() {
|
||||
if(this.func)
|
||||
{
|
||||
this.func();
|
||||
}
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
show(path:string)
|
||||
{
|
||||
ResManager.I.changeBundleSpriteFrame(this.image,path,"Chat18x",()=>{
|
||||
|
||||
Reference in New Issue
Block a user