mirror of
https://github.com/Drezil/imgui.git
synced 2025-04-16 16:14:01 +00:00
Fixed GetId()/BeginPopup() accessing current window in "append" mode
This commit is contained in:
parent
8c4c421f74
commit
5b0861768e
11
imgui.cpp
11
imgui.cpp
@ -3131,7 +3131,7 @@ static void ClearSetNextWindowData()
|
|||||||
static bool BeginPopupEx(const char* str_id, ImGuiWindowFlags extra_flags)
|
static bool BeginPopupEx(const char* str_id, ImGuiWindowFlags extra_flags)
|
||||||
{
|
{
|
||||||
ImGuiState& g = *GImGui;
|
ImGuiState& g = *GImGui;
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
ImGuiWindow* window = g.CurrentWindow;
|
||||||
const ImGuiID id = window->GetID(str_id);
|
const ImGuiID id = window->GetID(str_id);
|
||||||
if (!IsPopupOpen(id))
|
if (!IsPopupOpen(id))
|
||||||
{
|
{
|
||||||
@ -5454,20 +5454,17 @@ void ImGui::PopID()
|
|||||||
|
|
||||||
ImGuiID ImGui::GetID(const char* str_id)
|
ImGuiID ImGui::GetID(const char* str_id)
|
||||||
{
|
{
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
return GImGui->CurrentWindow->GetID(str_id);
|
||||||
return window->GetID(str_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiID ImGui::GetID(const char* str_id_begin, const char* str_id_end)
|
ImGuiID ImGui::GetID(const char* str_id_begin, const char* str_id_end)
|
||||||
{
|
{
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
return GImGui->CurrentWindow->GetID(str_id_begin, str_id_end);
|
||||||
return window->GetID(str_id_begin, str_id_end);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiID ImGui::GetID(const void* ptr_id)
|
ImGuiID ImGui::GetID(const void* ptr_id)
|
||||||
{
|
{
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
return GImGui->CurrentWindow->GetID(ptr_id);
|
||||||
return window->GetID(ptr_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// User can input math operators (e.g. +100) to edit a numerical values.
|
// User can input math operators (e.g. +100) to edit a numerical values.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user