static void OnSceneGUI(SceneView sceneView) { GridOnSceneGUI(sceneView); CSGOutlineRenderer.Instance.OnSceneGUI(sceneView); var dragArea = CSGSceneBottomGUI.OnSceneGUI(sceneView); CSGEditModeGUI.OnSceneGUI(sceneView, dragArea); CSGDragAndDropManager.Instance.OnSceneGUI(sceneView); CSGClickSelectionManager.Instance.OnSceneGUI(sceneView); KeyboardManager.OnSceneGUI(sceneView); }
private static void OnKeyboardEventCalled(KeyEventType type) { switch (type) { case KeyEventType.HalfGridSizeKey: CSGSceneBottomGUI.MultiplySnapDistance(0.5f); break; case KeyEventType.DoubleGridSizeKey: CSGSceneBottomGUI.MultiplySnapDistance(2.0f); break; // TODO: turn this into utility functions that are shared with CSGSceneBottomGUI case KeyEventType.ToggleBoundsSnappingKey: CSGEditorSettings.PivotSnapping = !CSGEditorSettings.PivotSnapping; CSGEditorSettings.Save(); break; case KeyEventType.TogglePivotSnappingKey: CSGEditorSettings.BoundsSnapping = !CSGEditorSettings.BoundsSnapping; CSGEditorSettings.Save(); break; case KeyEventType.ToggleShowGridKey: CSGEditorSettings.ShowGrid = !CSGEditorSettings.ShowGrid; CSGEditorSettings.Save(); break; } }