Made selection outline during play mode impossible and made outline outside of selected game object

This commit is contained in:
Antoine Pilote
2024-03-16 11:26:32 -04:00
parent ccdb305b54
commit 1fa0fd635f
6 changed files with 95 additions and 62 deletions

View File

@@ -370,7 +370,7 @@ namespace Nuake {
m_IsViewportFocused = ImGui::IsWindowFocused();
if (ImGui::GetIO().WantCaptureMouse && m_IsHoveringViewport && Input::IsMouseButtonPressed(GLFW_MOUSE_BUTTON_1) && !ImGuizmo::IsUsing() && m_IsViewportFocused)
if (!Engine::IsPlayMode() && ImGui::GetIO().WantCaptureMouse && m_IsHoveringViewport && Input::IsMouseButtonPressed(GLFW_MOUSE_BUTTON_1) && !ImGuizmo::IsUsing() && m_IsViewportFocused)
{
const auto windowPosNuake = Vector2(windowPos.x, windowPos.y);

View File

@@ -170,6 +170,8 @@ void EditorSelectionPanel::DrawAddComponentMenu(Nuake::Entity entity)
MenuItemComponent("Quake map", QuakeMapComponent);
ImGui::Separator();
MenuItemComponent("Audio Emitter", AudioEmitterComponent);
ImGui::Separator();
MenuItemComponent("Path", AudioEmitterComponent);
ImGui::EndPopup();
}
ImGui::Separator();