コード例 #1
0
        public override void init()
        {
            this.con              = base.getTransformByPath("con");
            a3_shejiao.instance   = this;
            this.tab              = new TabControl();
            this.tab.onClickHanle = new Action <TabControl>(this.OnSwitch);
            this.tab.create(base.getGameObjectByPath("tab"), base.gameObject, 0, 0, false);
            BaseButton baseButton = new BaseButton(base.getTransformByPath("close"), 1, 1);

            baseButton.onClick = new Action <GameObject>(this.OnClose);
            UIClient.instance.addEventListener(17001u, new Action <GameEvent>(this.OnOpenPanel));
        }
コード例 #2
0
        public override void init()
        {
            getComponentByPath <Text>("tab/knightage/Text").text = ContMgr.getCont("a3_shejiao_0");
            getComponentByPath <Text>("tab/friend/Text").text    = ContMgr.getCont("a3_shejiao_1");
            getComponentByPath <Text>("tab/team/Text").text      = ContMgr.getCont("a3_shejiao_2");



            con              = getTransformByPath("con");
            instance         = this;
            tab              = new TabControl();
            tab.onClickHanle = OnSwitch;
            tab.create(getGameObjectByPath("tab"), this.gameObject);

            BaseButton closeBtn = new BaseButton(getTransformByPath("close"));

            closeBtn.onClick = OnClose;

            UIClient.instance.addEventListener(UI_EVENT.ON_OPENFRIENDPANEL, OnOpenPanel);
        }