fixed unselecting entity when cursor goes from ImGui to viewport while click is held
This commit is contained in:
@@ -3,9 +3,6 @@
|
||||
|
||||
#include <open_engine.hpp>
|
||||
|
||||
#include "open_engine/renderer/renderer3d.hpp"
|
||||
#include "open_engine/scene/components.hpp"
|
||||
#include "open_engine/scene/scene_serializer.hpp"
|
||||
#include "panels/content_browser.hpp"
|
||||
#include "panels/scene_hierarchy.hpp"
|
||||
|
||||
@@ -181,7 +178,6 @@ namespace OpenEngine {
|
||||
RenderCommand::Clear();
|
||||
framebuffer->ClearBufferI(1, -1);
|
||||
|
||||
|
||||
switch (state) {
|
||||
case PlayState::Play: {
|
||||
scene->OnUpdateRuntime();
|
||||
@@ -208,6 +204,7 @@ namespace OpenEngine {
|
||||
static bool clicked = false;
|
||||
// Mouse Picking
|
||||
if (Input::IsMouseButtonPressed(MouseCode::ButtonLeft)
|
||||
&& !Application::Get().GetImGuiLayer()->GetBlockEvents()
|
||||
&& mouse_x >= 0 && mouse_y >= 0
|
||||
&& mouse_x < (int)viewport_size.x
|
||||
&& mouse_y < (int)viewport_size.y
|
||||
|
||||
Reference in New Issue
Block a user