Эх сурвалжийг харах

Update where toggle check is implemented
Remove the togglegrid function

weinand 9 жил өмнө
parent
commit
b460a66d12

+ 5 - 9
Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

@@ -361,14 +361,6 @@ bool SceneView3D::MouseInView()
 
 
 }
 }
 
 
-void SceneView3D::ToggleGrid()
-{
-    Input* input = GetSubsystem<Input>();
-
-    if (input->GetKeyPress(KEY_G))
-        gridEnabled_ = !gridEnabled_;
-}
-
 void SceneView3D::HandleUIUnhandledShortcut(StringHash eventType, VariantMap& eventData)
 void SceneView3D::HandleUIUnhandledShortcut(StringHash eventType, VariantMap& eventData)
 {
 {
     if (!enabled_)
     if (!enabled_)
@@ -514,8 +506,12 @@ bool SceneView3D::OnEvent(const TBWidgetEvent &ev)
         }
         }
     }
     }
     if (ev.type == EVENT_TYPE_KEY_DOWN)
     if (ev.type == EVENT_TYPE_KEY_DOWN)
-        ToggleGrid();
+    {
+        Input* input = GetSubsystem<Input>();
 
 
+        if (input->GetKeyPress(KEY_G))
+            gridEnabled_ = !gridEnabled_;
+    }
     return sceneEditor_->OnEvent(ev);
     return sceneEditor_->OnEvent(ev);
 }
 }