Skip to content

Commit

Permalink
Prevent mouse picking when hovering over imguizmo
Browse files Browse the repository at this point in the history
  • Loading branch information
roeas committed Jul 26, 2024
1 parent f03a175 commit 76bf767
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions Engine/Config/imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -53,42 +53,42 @@ Collapsed=0

[Window][DockSpaceViewport_11111111]
Pos=0,24
Size=1918,1056
Size=2560,1542
Collapsed=0

[Window][Scene]
Pos=446,24
Size=1018,740
Size=1660,1226
Collapsed=0
DockId=0x0000000C,0

[Window][Info]
Pos=1465,24
Size=453,1056
Pos=2107,24
Size=453,1542
Collapsed=0
DockId=0x0000000E,0

[Window][Entity List]
Pos=0,24
Size=445,740
Size=445,1226
Collapsed=0
DockId=0x0000000B,0

[Window][Asset Browser]
Pos=783,765
Size=681,315
Pos=1126,1251
Size=980,315
Collapsed=0
DockId=0x00000007,0

[Window][Details]
Pos=1465,24
Size=453,1056
Pos=2107,24
Size=453,1542
Collapsed=0
DockId=0x0000000E,1

[Window][Log]
Pos=0,765
Size=782,315
Pos=0,1251
Size=1125,315
Collapsed=0
DockId=0x00000005,0

Expand Down Expand Up @@ -339,7 +339,7 @@ DockNode ID=0x00000001 Pos=403,222 Size=1456,821 Split=X
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=395,660 Split=X Selected=0xE87781F4
DockNode ID=0x00000004 Parent=0x00000003 SizeRef=391,659 Selected=0xE87781F4
DockNode ID=0x00000006 Parent=0x00000003 SizeRef=389,659 Selected=0xDE6E0C33
DockSpace ID=0x8B93E3BD Window=0xA787BDB4 Pos=277,335 Size=1918,1056 Split=X
DockSpace ID=0x8B93E3BD Window=0xA787BDB4 Pos=0,58 Size=2560,1542 Split=X
DockNode ID=0x0000000D Parent=0x8B93E3BD SizeRef=1464,701 Split=Y
DockNode ID=0x00000011 Parent=0x0000000D SizeRef=1280,1226 Split=X
DockNode ID=0x0000000B Parent=0x00000011 SizeRef=445,701 Selected=0x29736E03
Expand Down
4 changes: 2 additions & 2 deletions Engine/Source/Editor/Layer/ImGuiLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ void ImGuiLayer::ShowAssetBrowser()

// Disable the back button if the current path reaches the outermost path.
std::string crtPath = m_assetBrowserCrtPath.generic_string();
bool backButtonDisabled = !sl::Path::Contain(sl::Path::AssetPath, crtPath);
const bool backButtonDisabled = !sl::Path::Contain(sl::Path::AssetPath, crtPath);
if (backButtonDisabled)
{
ImGui::BeginDisabled();
Expand Down Expand Up @@ -1181,7 +1181,7 @@ bool ImGuiLayer::OnMouseButtonPress(sl::MouseButtonPressEvent &event)
{
camera.m_controllerMode = sl::CameraControllerMode::Editor;
}
else
else if (!ImGuizmo::IsOver())
{
MousePick();
}
Expand Down

0 comments on commit 76bf767

Please sign in to comment.