Exemple #1
0
        public world()
        {
            mRoot = UI.Instance.fromXML(XMLFrame, false);

            //mRoot.evtOnLMDown += (ui, x, y)=>{return false;};
            //mRoot.evtOnLMUp += (ui, x, y) => { return false; };
            //mRoot.evtOnMMove += (ui, x, y) => { return false; };
            mUIMainRole = mRoot.findByPath("mainRole");
            mUIRoles = mRoot.findByPath("roles");
            mPrompt = mRoot.findByPath("forground/prompt") as UILabel;
            mScore = mRoot.findByPath("forground/score") as UILabel;
            mBestScore = mRoot.findByPath("forground/bestScore") as UILabel;
            mMainRole = new mainRole(this);
        }
Exemple #2
0
        public UIMM()
        {
            mRoot = UI.Instance.fromXML(XMLLayout, false);
            mRoot.adjustLayout();
            var round = mRoot.findByPath("subs");
            mRoot.evtOnLMUp += (ui, x, y) => { return false; };//to disable paresent.round to handle event
            round.evtOnLMUp += (ui, x, y) =>
            {
                var node = this.cast<YAMMNode>();
                node.toggleOpen();
                return false;
            };

            mline1 = new UILine();//line1
            mline1.color = (uint)EColorUtil.dimgray;
            mline1.setLineWidth(2);

            mline2 = new UILine();
            mline2.color = (uint)EColorUtil.dimgray;
            mline2.setLineWidth(2);

            mRoot.evtOnDragMove += (x, y) =>
                {
                    adjustLink();
                };
            mRoot.evtOnDragBegin += (x, y) =>
                {
                    var node = this.cast<YAMMNode>();
                    YAMM.Instance.setCurrent(node);
                };
            mRoot.evtOnDClick += (ui, x, y) =>
                {
                    rerangeChildren();
                    return false;
                };
        }