Commit 48214989 authored by wildfirecode13's avatar wildfirecode13

update

parent 11c967c1
let func;
func = (object:FYGE.Container, name:string)=>{
let getObject;
getObject = (object:FYGE.Container, name:string)=>{
const result = object.getChildByName(name);
if(result) return result;
for (const child of object.children) {
const result = func(child,name);
const result = getObject(child,name);
if(result) return result;
}
return null;
}
export default func
\ No newline at end of file
export default getObject
\ No newline at end of file
import { Panel } from "../../module/views/Panel";
import getObject from "../getObject";
import { Tools } from "../Tools";
import { getWebData, sendWebNet, WebNetName } from "../WebNet";
export class PrizePanel extends Panel {
initUi() {
super.initUi();
}
get groupNames() { return ["prize"] }
get skinName() { return "prize" }
//两个按钮都是关闭作用
get closeBtns() {
return [getObject(this, 'prize_closebtn'), getObject(this, 'prize_okbtn')];
}
async start(data) {
super.start();
}
}
\ No newline at end of file
import { showPanel } from "../../module/ctrls";
import { Scene } from "../../module/views/Scene";
import getObject from "../getObject";
import { PrizePanel } from "../panels/prize";
export class NewbieScene extends Scene {
get groupNames() { return ["newbie"] }
get skinName() { return "newbie" }
initUi() {
super.initUi()
super.initUi();
}
async start(data) {
super.start()
console.log(this);
this.addEventListener(FYGE.MouseEvent.CLICK,()=>{
showPanel(PrizePanel);
},this);
}
initEvents() {
......@@ -18,4 +26,6 @@ export class NewbieScene extends Scene {
removeEvents() {
super.removeEvents();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment