12345678910111213141516171819202122232425262728293031323334 |
- import { _decorator, Component, Node } from 'cc';
- import { GameUILayers, gui } from '../../../core/ui/ui';
- import ui_base from '../../../core/ui/ui_base';
- import { ModuleDef } from '../../../Scripts/ModuleDef';
- import { Layout_SideBar } from './Layout_SideBar';
- import { ani_ui } from '../UI_Main/UI_Main';
- import { Start } from '../../../start/Start';
- const { ccclass, property } = _decorator;
- @ccclass('UI_SideBar')
- export class UI_SideBar extends ui_base {
- constructor(){
- super(ModuleDef.GAME, 'ui/UI_SideBar/SideBar', GameUILayers.HUD, Layout_SideBar);
- }
- protected async onCreated() {
- const layout = this.getLayout<Layout_SideBar>();
- ani_ui(layout.Close_Btn.node.parent);
- this.onButtonEvent(layout.Close_Btn, ()=>{
- gui.close(UI_SideBar);
- });
- this.onButtonEvent(layout.Go_SideBar, ()=>{
- //进入侧边栏
- chsdk.goToSidebar();
- });
- layout.Logo.spriteFrame=layout.Logos[Start.packId];
- }
- }
|