1234567891011121314151617181920212223242526 |
- /** @format */
- import {UI} from '../enums/UI'
- import {Data, Mgr} from '../GameControl'
- import {ccUtils} from '../utils/ccUtils'
- import {observer, render, node, label, editBox, list} from '../mobx/observer'
- import {BaseUI} from '../ui/BaseUI'
- const {ccclass, property} = cc._decorator
- @ccclass
- @observer
- export class FootCell extends cc.Component {
- @node('toggles')
- toggles: cc.Node
- mods: UI[] = [0, UI.RoleUI, UI.MainUI, UI.TalentUI, 0]
- init(baseUI: BaseUI) {
- ccUtils.setTogglesChecked(this.mods.indexOf(baseUI.uiID), this.toggles)
- }
- onToggleClick(e) {
- let ui = this.mods[e.target.parent.indexOf(e.target)]
- Mgr.global.tryJumpMod(ui)
- }
- }
|