mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-28 07:47:02 -05:00
Viewports: add GetDebugName() helper.
This commit is contained in:
@@ -16539,6 +16539,12 @@ void ImGui::LocalizeRegisterEntries(const ImGuiLocEntry* entries, int count)
|
|||||||
// - DestroyPlatformWindows()
|
// - DestroyPlatformWindows()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
const char* ImGuiViewport::GetDebugName() const
|
||||||
|
{
|
||||||
|
const ImGuiViewportP* viewport = (const ImGuiViewportP*)this;
|
||||||
|
return viewport->Window ? viewport->Window->Name : "n/a";
|
||||||
|
}
|
||||||
|
|
||||||
void ImGuiPlatformIO::ClearPlatformHandlers()
|
void ImGuiPlatformIO::ClearPlatformHandlers()
|
||||||
{
|
{
|
||||||
Platform_GetClipboardTextFn = NULL;
|
Platform_GetClipboardTextFn = NULL;
|
||||||
|
|||||||
1
imgui.h
1
imgui.h
@@ -4125,6 +4125,7 @@ struct ImGuiViewport
|
|||||||
// Helpers
|
// Helpers
|
||||||
ImVec2 GetCenter() const { return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); }
|
ImVec2 GetCenter() const { return ImVec2(Pos.x + Size.x * 0.5f, Pos.y + Size.y * 0.5f); }
|
||||||
ImVec2 GetWorkCenter() const { return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
|
ImVec2 GetWorkCenter() const { return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
|
||||||
|
IMGUI_API const char* GetDebugName() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user