Cleanup.
This commit is contained in:
parent
5b0c53fabc
commit
9bf22e0a24
9
3rdparty/ocornut-imgui/imgui_wm.cpp
vendored
9
3rdparty/ocornut-imgui/imgui_wm.cpp
vendored
@ -1333,6 +1333,12 @@ namespace ImGuiWM
|
||||
}
|
||||
}
|
||||
|
||||
static ImVec2 GetCursorPos()
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
return io.MousePos;
|
||||
}
|
||||
|
||||
void WindowManager::StartDragWindow(Window* pWindow)
|
||||
{
|
||||
if (NULL == m_pDraggedWindow)
|
||||
@ -1391,7 +1397,8 @@ namespace ImGuiWM
|
||||
}
|
||||
|
||||
//if (!((ImGuiState*)m_pDragPlatformWindow->m_pState)->IO.MouseDown[0])
|
||||
if (!IsLeftClickDown())
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
if (!io.MouseDown[0])
|
||||
{
|
||||
if (NULL != pBestContainer)
|
||||
{
|
||||
|
4
3rdparty/ocornut-imgui/imgui_wm.h
vendored
4
3rdparty/ocornut-imgui/imgui_wm.h
vendored
@ -264,8 +264,6 @@ namespace ImGuiWM
|
||||
protected:
|
||||
virtual PlatformWindow* CreatePlatformWindow(bool bMain,PlatformWindow* pParent,bool bDragWindow) = 0;
|
||||
virtual void InternalRun() = 0;
|
||||
virtual ImVec2 GetCursorPos() = 0;
|
||||
virtual bool IsLeftClickDown() = 0;
|
||||
|
||||
void AddWindow(Window* pWindow);
|
||||
void RemoveWindow(Window* pWindow);
|
||||
@ -293,7 +291,7 @@ namespace ImGuiWM
|
||||
void StartDragWindow(Window* pWindow);
|
||||
void StopDragWindow();
|
||||
void UpdateDragWindow();
|
||||
Container* GetBestDocking(PlatformWindow* pPlatformWindow,const ImVec2 oCursorPos,EDockOrientation& oOutOrientation,ImVec2& oOutAreaPos,ImVec2& oOutAreaSize);
|
||||
Container*GetBestDocking(PlatformWindow* pPlatformWindow,const ImVec2 oCursorPos,EDockOrientation& oOutOrientation,ImVec2& oOutAreaPos,ImVec2& oOutAreaSize);
|
||||
|
||||
Config m_oConfig;
|
||||
PlatformWindow* m_pMainPlatformWindow;
|
||||
|
@ -143,18 +143,6 @@ protected:
|
||||
PreUpdate();
|
||||
Update();
|
||||
}
|
||||
|
||||
virtual ImVec2 GetCursorPos() BX_OVERRIDE
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
return io.MousePos;
|
||||
}
|
||||
|
||||
virtual bool IsLeftClickDown() BX_OVERRIDE
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
return io.MouseDown[0];
|
||||
}
|
||||
};
|
||||
|
||||
struct OcornutImguiContext
|
||||
@ -362,10 +350,12 @@ struct OcornutImguiContext
|
||||
Window* w0 = new Window("test");
|
||||
Window* w1 = new Window("abcd");
|
||||
Window* w2 = new Window("xyzw");
|
||||
Window* w3 = new Window("0123");
|
||||
|
||||
m_wm->Dock(w0);
|
||||
m_wm->DockWith(w1, w0, ImGuiWM::E_DOCK_ORIENTATION_RIGHT);
|
||||
m_wm->DockWith(w2, w1, ImGuiWM::E_DOCK_ORIENTATION_BOTTOM);
|
||||
m_wm->DockWith(w3, w0, ImGuiWM::E_DOCK_ORIENTATION_BOTTOM);
|
||||
}
|
||||
#endif // 0
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user