예제 #1
0
        public GRoot()
        {
            _modalLayer = new GGraph();
            _modalLayer.shape.DrawRect(10, 10, 0, 0, (((uint)(255.0f * UIConfig.modalLayerAlpha)) << 24) + UIConfig.modalLayerColor);

            _popupStack       = new List <GObject>();
            _justClosedPopups = new List <GObject>();

            onFocusChanged = new EventListener(this, "onFocusChanged");
        }
예제 #2
0
        public static GObject NewObject(string type, AppContext context)
        {
            GObject cls = null;

            switch (type)
            {
            case "image":
                cls = new GImage();
                break;

            case "movieclip":
                cls = new GMovieClip();
                break;

            case "swf":
                cls = new GSwfObject();
                break;

            case "jta":
                cls = new GJtaObject();
                break;

            case "component":
                cls = new GComponent();
                break;

            case "text":
                cls = new GTextField();
                break;

            case "group":
                cls = new GGroup();
                break;

            case "list":
                cls = new GList();
                break;

            case "graph":
                cls = new GGraph();
                break;

            case "loader":
                cls = new GLoader();
                break;

            //component derived
            case "Button":
                cls = new GButton();
                break;

            case "Label":
                cls = new GLabel();
                break;

            case "ProgressBar":
                cls = new GProgressBar();
                break;

            case "Slider":
                cls = new GSlider();
                break;

            case "ScrollBar":
                cls = new GScrollBar();
                break;

            case "ComboBox":
                cls = new GComboBox();
                break;
            }
            cls.OnCreate(context);
            return(cls);
        }