Ejemplo n.º 1
0
        public override void Initialize()
        {
            base.Initialize();
            Overflow = OverflowType.Hidden;
            _window  = new UIWindow()
            {
                Name        = "Editor",
                Size        = new Vector2(800, 640),
                AnchorPoint = new Vector2(0.5f, 0.5f),
                Position    = new Vector2(100, 100)
            };
            _body = new UIElement()
            {
                Name       = "Body",
                Pivot      = new Vector2(0, 0),
                Position   = new Vector2(10, 32),
                SizeFactor = new Vector2(1, 1),
                Size       = new Vector2(-PADDING_BODY * 2, -32 - PADDING_BODY),
            };
            Navigator = new Navigator(this)
            {
                Name        = "Navigator",
                Pivot       = new Vector2(0.5f, 0f),
                AnchorPoint = new Vector2(0.5f, 0f),
                SizeFactor  = new Vector2(1f, 0f),
                Size        = new Vector2(0, 35f),
                Position    = new Vector2(0, 0),
            };
            Browser = new Browser(this)
            {
                Name        = "Browser",
                Pivot       = new Vector2(0, 0),
                AnchorPoint = new Vector2(0, 0),
                SizeFactor  = new Vector2(0.382f, 1f),
                Overflow    = OverflowType.Hidden,
            };
            Viewer = new Viewer(this)
            {
                Name        = "Viewer",
                Pivot       = new Vector2(0, 0),
                AnchorPoint = new Vector2(0, 0),
                SizeFactor  = new Vector2(0.618f, 0.7f),
            };
            Inspecter = new Inspecter(this)
            {
                Name        = "Inspector",
                Pivot       = new Vector2(0, 0),
                AnchorPoint = new Vector2(0, 0),
                SizeFactor  = new Vector2(0.618f, 0.3f),
            };
            _window.OnClose += Box1_OnClose;
            AppendChild(_window);
            _window.AppendChild(_body);
            _body.AppendChild(Navigator);
            _body.AppendChild(Viewer);
            _body.AppendChild(Browser);
            _body.AppendChild(Inspecter);

            _init();
            IsActive = false;
        }
Ejemplo n.º 2
0
 public void _init()
 {
     Browser.Initialize();
     Viewer.Initialize();
     Inspecter.Initialize();
 }