Exemplo n.º 1
0
 public void RefreshOnContentChange()
 {
     FillContentImageList();
     FillMaterialList();
     FillSceneNames();
     controlTransformer = new ControlTransformer(editorService);
 }
Exemplo n.º 2
0
        public bool LoadScene()
        {
            if (!ContentLoader.Exists(UIName, ContentType.Scene))
            {
                return(true);                //ncrunch: no coverage
            }
            editorService.Viewport.DestroyRenderedEntities();
            Messenger.Default.Send("ClearScene", "ClearScene");
            var scene = new Scene();

            Scene = new Scene();
            try
            {
                scene = ContentLoader.Load <Scene>(UIName);
                foreach (var control in scene.Controls)
                {
                    ActivateControl((Control)control);
                }
            }
            catch
            {
                foreach (var control in EntitiesRunner.Current.GetEntitiesOfType <Control>())
                {
                    ActivateControl((Control)control);
                }
            }
            UISceneGrid.DrawGrid();
            uiSceneGrid.UpdateGridOutline(SceneResolution);
            controlTransformer = new ControlTransformer(editorService);
            return(false);
        }
Exemplo n.º 3
0
 private void InitializeClasses()
 {
     ScreenSpace.Scene           = new SceneScreenSpace(editorService.Viewport.Window, SceneResolution);
     ControlProcessor            = new ControlProcessor();
     controlAdder                = new ControlAdder();
     controlChanger              = new ControlChanger();
     uiControl                   = new UIControl();
     controlTransformer          = new ControlTransformer(editorService);
     controlAllignmentAndMargins = new ControlAllignmentAndMargins(this);
     controlMaterialChanger      = new ControlMaterialChanger(this);
     uiSceneGrid                 = new UISceneGrid(this);
 }
Exemplo n.º 4
0
		private void InitializeClasses()
		{
			ScreenSpace.Scene = new SceneScreenSpace(editorService.Viewport.Window, SceneResolution);
			ControlProcessor = new ControlProcessor();
			controlAdder = new ControlAdder();
			controlChanger = new ControlChanger();
			uiControl = new UIControl();
			controlTransformer = new ControlTransformer(editorService);
			controlAllignmentAndMargins = new ControlAllignmentAndMargins(this);
			controlMaterialChanger = new ControlMaterialChanger(this);
			uiSceneGrid = new UISceneGrid(this);
		}
Exemplo n.º 5
0
		public void RefreshOnContentChange()
		{
			FillContentImageList();
			FillMaterialList();
			FillSceneNames();
			controlTransformer = new ControlTransformer(editorService);
		}
Exemplo n.º 6
0
		public bool LoadScene()
		{
			if (!ContentLoader.Exists(UIName, ContentType.Scene))
				return true; //ncrunch: no coverage
			editorService.Viewport.DestroyRenderedEntities();
			Messenger.Default.Send("ClearScene", "ClearScene");
			var scene = new Scene();
			Scene = new Scene();
			try
			{
				scene = ContentLoader.Load<Scene>(UIName);
				foreach (var control in scene.Controls)
					ActivateControl((Control)control);
			}
			catch
			{
				foreach (var control in EntitiesRunner.Current.GetEntitiesOfType<Control>())
					ActivateControl((Control)control);
			}
			UISceneGrid.DrawGrid();
			uiSceneGrid.UpdateGridOutline(SceneResolution);
			controlTransformer = new ControlTransformer(editorService);
			return false;
		}