Exemple #1
0
        public void lostAttach()
        {
            mMenu.paresent = null;
            mMenu = null;

            UI.Instance.root.evtOnRMUp -= rightHandler;
            UI.Instance.root.evtOnLMDown -= leftHandler;
        }
Exemple #2
0
        public UIWidget getAttach()
        {
            mMenu = new UIMenu();
            //m.itemWidth = 64;
            //m.itemHeight = 20;
            mMenu.addItem("item1", () => { Console.WriteLine("click item1"); mMenu.visible = false; mMenu.setDirty(true); });
            mMenu.addItem("item2", () => { Console.WriteLine("click item2"); mMenu.visible = false; mMenu.setDirty(true); });
            mMenu.paresent = UI.Instance.root;
            UI.Instance.root.evtOnRMUp += rightHandler;
            UI.Instance.root.evtOnLMDown += leftHandler;

            rightHandler(null, 0, 0);
            return UI.Instance.fromXML(@"
            <stub dragAble='*true'>
            </stub>", false);
            //UI.Instance.getTip().foreground = (uint)EColorUtil.red;
            //UI.Instance.getTip().background = (uint)EColorUtil.black;
            //UI.Instance.getTip().size = 20;
        }