mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
BugFix IconButton (pop id)
This commit is contained in:
@@ -192,8 +192,11 @@ bool ImGuiToolkit::IconButton(int i, int j, const char *tooltip)
|
||||
ImVec2 draw_pos = window->DC.CursorPos;
|
||||
const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size);
|
||||
ImGui::ItemSize(size);
|
||||
if (!ImGui::ItemAdd(bb, id))
|
||||
|
||||
if (!ImGui::ItemAdd(bb, id)){
|
||||
ImGui::PopID();
|
||||
return false;
|
||||
}
|
||||
|
||||
ImGuiButtonFlags flags = 0;
|
||||
if (window->DC.ItemFlags & ImGuiItemFlags_ButtonRepeat)
|
||||
|
||||
@@ -1556,8 +1556,12 @@ void UserInterface::RenderMetrics(bool *p_open, int* p_corner, int *p_mode)
|
||||
|
||||
ImGui::SetNextWindowBgAlpha(0.35f); // Transparent background
|
||||
|
||||
if (ImGui::Begin("Metrics", NULL, (corner != -1 ? ImGuiWindowFlags_NoMove : 0) | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
if (!ImGui::Begin("Metrics", NULL, (corner != -1 ? ImGuiWindowFlags_NoMove : 0) | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
|
||||
ImGui::SetNextItemWidth(200);
|
||||
ImGui::Combo("##mode", p_mode,
|
||||
ICON_FA_TACHOMETER_ALT " Performance\0"
|
||||
@@ -1658,8 +1662,8 @@ void UserInterface::RenderMetrics(bool *p_open, int* p_corner, int *p_mode)
|
||||
if (p_open && ImGui::MenuItem( ICON_FA_TIMES " Close")) *p_open = false;
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
|
||||
void UserInterface::RenderAbout(bool* p_open)
|
||||
|
||||
Reference in New Issue
Block a user