Exemple #1
0
 public CPage(string name, UIWidget p)
 {
     id = idCount++;
     mRoot = UIRoot.Instance.loadFromXML(XMLPAGE);
     mRoot.name = "";
     mSplit = mRoot.childOfPath("split") as UIRect;
     mSplit.name = "";
     mTab = mRoot.childOfPath("tab") as UIRect;
     mTab.name = "";
     mTabName = mTab.childOf("tabName") as UILable;
     mTabName.name = "";
     mTabName.text = name;
     mClient = mRoot.childOfPath("client");
     mClient.name = "";
     mRoot.paresent = p;
 }
Exemple #2
0
            public CMenu(UIEditor edt, string menuName)
            {
                mMenuName = menuName;
                mEditor = edt;

                mTab = UIRoot.Instance.loadFromXML(xmltabCtn);
                var lb = mTab.childOf("tabName") as UILable;
                lb.text = menuName;
                mCommands = UIRoot.Instance.loadFromXML(xmlcommandCtn);
                lb = mCommands.childOfPath("cmdName") as UILable;
                lb.text = menuName;

                mTab.paresent = edt.mTabCtn;
                mCommands.paresent = edt.mCommandCtn;

                mTab.evtOnLMDown += (ui, x, y) =>
                {
                    return false;
                };
                mTab.evtOnLMUp += (ui, x, y) =>
                    {
                        mEditor.setCurrentMenu(mMenuName);
                        return false;
                    };
            }