mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-20 14:56:35 +00:00
Backends: amends to 1db1066 + merge minor bits from docking incl SetActiveIdUsingNavAndKeys().
No need to clear fields before deletion. DX12: renamed to match docking branch.
This commit is contained in:
parent
682447306d
commit
0f7eb00f67
@ -179,6 +179,7 @@ struct VERTEX_CONSTANT_BUFFER
|
|||||||
static void ImGui_ImplDX12_InitPlatformInterface();
|
static void ImGui_ImplDX12_InitPlatformInterface();
|
||||||
static void ImGui_ImplDX12_ShutdownPlatformInterface();
|
static void ImGui_ImplDX12_ShutdownPlatformInterface();
|
||||||
|
|
||||||
|
// Functions
|
||||||
static void ImGui_ImplDX12_SetupRenderState(ImDrawData* draw_data, ID3D12GraphicsCommandList* ctx, ImGui_ImplDX12_RenderBuffers* fr)
|
static void ImGui_ImplDX12_SetupRenderState(ImDrawData* draw_data, ID3D12GraphicsCommandList* ctx, ImGui_ImplDX12_RenderBuffers* fr)
|
||||||
{
|
{
|
||||||
ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
|
ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
|
||||||
|
@ -326,14 +326,10 @@ void ImGui_ImplGlfw_Shutdown()
|
|||||||
glfwSetScrollCallback(bd->Window, bd->PrevUserCallbackScroll);
|
glfwSetScrollCallback(bd->Window, bd->PrevUserCallbackScroll);
|
||||||
glfwSetKeyCallback(bd->Window, bd->PrevUserCallbackKey);
|
glfwSetKeyCallback(bd->Window, bd->PrevUserCallbackKey);
|
||||||
glfwSetCharCallback(bd->Window, bd->PrevUserCallbackChar);
|
glfwSetCharCallback(bd->Window, bd->PrevUserCallbackChar);
|
||||||
bd->InstalledCallbacks = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
|
for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
|
||||||
{
|
|
||||||
glfwDestroyCursor(bd->MouseCursors[cursor_n]);
|
glfwDestroyCursor(bd->MouseCursors[cursor_n]);
|
||||||
bd->MouseCursors[cursor_n] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
io.BackendPlatformName = NULL;
|
io.BackendPlatformName = NULL;
|
||||||
io.BackendPlatformUserData = NULL;
|
io.BackendPlatformUserData = NULL;
|
||||||
|
@ -237,19 +237,18 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
|
|||||||
|
|
||||||
// Store GLSL version string so we can refer to it later in case we recreate shaders.
|
// Store GLSL version string so we can refer to it later in case we recreate shaders.
|
||||||
// Note: GLSL version is NOT the same as GL version. Leave this to NULL if unsure.
|
// Note: GLSL version is NOT the same as GL version. Leave this to NULL if unsure.
|
||||||
#if defined(IMGUI_IMPL_OPENGL_ES2)
|
|
||||||
if (glsl_version == NULL)
|
if (glsl_version == NULL)
|
||||||
|
{
|
||||||
|
#if defined(IMGUI_IMPL_OPENGL_ES2)
|
||||||
glsl_version = "#version 100";
|
glsl_version = "#version 100";
|
||||||
#elif defined(IMGUI_IMPL_OPENGL_ES3)
|
#elif defined(IMGUI_IMPL_OPENGL_ES3)
|
||||||
if (glsl_version == NULL)
|
|
||||||
glsl_version = "#version 300 es";
|
glsl_version = "#version 300 es";
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
if (glsl_version == NULL)
|
|
||||||
glsl_version = "#version 150";
|
glsl_version = "#version 150";
|
||||||
#else
|
#else
|
||||||
if (glsl_version == NULL)
|
|
||||||
glsl_version = "#version 130";
|
glsl_version = "#version 130";
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(bd->GlslVersionString));
|
IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(bd->GlslVersionString));
|
||||||
strcpy(bd->GlslVersionString, glsl_version);
|
strcpy(bd->GlslVersionString, glsl_version);
|
||||||
strcat(bd->GlslVersionString, "\n");
|
strcat(bd->GlslVersionString, "\n");
|
||||||
|
@ -7170,6 +7170,7 @@ void ImGui::PopTextWrapPos()
|
|||||||
window->DC.TextWrapPosStack.pop_back();
|
window->DC.TextWrapPosStack.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: We are exposing the docking hierarchy to end-user here (via IsWindowHovered, IsWindowFocused) which is unusual.
|
||||||
bool ImGui::IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent)
|
bool ImGui::IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent)
|
||||||
{
|
{
|
||||||
if (window->RootWindowDockTree == potential_parent)
|
if (window->RootWindowDockTree == potential_parent)
|
||||||
|
@ -7991,7 +7991,7 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
|||||||
|
|
||||||
// Click to Select a tab
|
// Click to Select a tab
|
||||||
ImGuiButtonFlags button_flags = ((is_tab_button ? ImGuiButtonFlags_PressedOnClickRelease : ImGuiButtonFlags_PressedOnClick) | ImGuiButtonFlags_AllowItemOverlap);
|
ImGuiButtonFlags button_flags = ((is_tab_button ? ImGuiButtonFlags_PressedOnClickRelease : ImGuiButtonFlags_PressedOnClick) | ImGuiButtonFlags_AllowItemOverlap);
|
||||||
if (g.DragDropActive && !g.DragDropPayload.IsDataType(IMGUI_PAYLOAD_TYPE_WINDOW))
|
if (g.DragDropActive && !g.DragDropPayload.IsDataType(IMGUI_PAYLOAD_TYPE_WINDOW)) // FIXME: May be an opt-in property of the payload to disable this
|
||||||
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
||||||
bool hovered, held;
|
bool hovered, held;
|
||||||
bool pressed = ButtonBehavior(bb, id, &hovered, &held, button_flags);
|
bool pressed = ButtonBehavior(bb, id, &hovered, &held, button_flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user