Ejemplo n.º 1
0
        protected override void LoadContent()
        {
            _inited = true;
            if (_mainView == null)
            {
                return;
            }

            _drawBatch = new AdvancedDrawBatch(GraphicsDevice);

            ContentLoading?.Invoke(this);

            IDefinitionClass obj = _mainView.CreateInstance(null, null);

            MainView = (UiContainer)obj;

            MainView.RecalculateAll();

            MainView.RegisterView();
            MainView.ViewAdded();

            ViewLoaded?.Invoke(this);

            MainView.Bounds = new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
        }
Ejemplo n.º 2
0
        protected override void LoadContent()
        {
            _drawBatch = new AdvancedDrawBatch(GraphicsDevice);

            if (ContentLoading != null)
            {
                ContentLoading(this);
            }

            IDefinitionClass obj = _mainView.CreateInstance(null, null);

            MainView = (UiContainer)obj;

            MainView.RecalculateAll();

            MainView.RegisterView();
            MainView.ViewAdded();

            if (ViewLoaded != null)
            {
                ViewLoaded(this);
            }

            MainView.Bounds = new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
        }
Ejemplo n.º 3
0
        public void ReloadView(string path)
        {
            DefinitionFile file = ContentLoader.Current.Load <DefinitionFile>(path);

            _mainView = file;

            IDefinitionClass obj = _mainView.CreateInstance(null, null);

            MainView = (UiContainer)obj;

            MainView.RecalculateAll();

            MainView.RegisterView();
            MainView.ViewAdded();


            ViewLoaded?.Invoke(this);


            MainView.Bounds = new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
        }