public static void PostUILoad() { //init static systems Renderer.Init(); Input.Init(); TerrainToolDock.Init(); //init world cursor = new _3dCursor(); LoadNewProject(HWDEScenarioSize.small512); //temp TerrainToolDock.tools["Texture Painter"].button.PerformClick(); }
public static void Update() { if (!projectLoaded) { return; } if (!freeze3dCursor) { cursor.UpdatePositionOnTerrain(); } mouseInBounds = true; if (Input.mouseAbsPosScreen.X < 0) { if (loopCursorInBounds) { Cursor.Position = new System.Drawing.Point(Renderer.viewport.PointToScreen(new System.Drawing.Point(Renderer.viewport.Width, 0)).X, Cursor.Position.Y); } if (!loopCursorInBounds) { mouseInBounds = false; } } if (Input.mouseAbsPosScreen.X > Renderer.viewport.Width) { if (loopCursorInBounds) { Cursor.Position = new System.Drawing.Point(Renderer.viewport.PointToScreen(new System.Drawing.Point(0, 0)).X, Cursor.Position.Y); } if (!loopCursorInBounds) { mouseInBounds = false; } } if (Input.mouseAbsPosScreen.Y < 0) { if (loopCursorInBounds) { Cursor.Position = new System.Drawing.Point(Cursor.Position.X, Renderer.viewport.PointToScreen(new System.Drawing.Point(0, Renderer.viewport.Height)).Y); } if (!loopCursorInBounds) { mouseInBounds = false; } } if (Input.mouseAbsPosScreen.Y > Renderer.viewport.Height) { if (loopCursorInBounds) { Cursor.Position = new System.Drawing.Point(Cursor.Position.X, Renderer.viewport.PointToScreen(new System.Drawing.Point(0, 0)).Y); } if (!loopCursorInBounds) { mouseInBounds = false; } } TerrainToolDock.UpdateAll(); }