|
@@ -305,7 +305,7 @@
|
|
When you are not sure about a old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
|
When you are not sure about a old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
|
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
|
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
|
|
|
|
|
- - 2017/07/22 (1.63) - changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecisions over time.
|
|
|
|
|
|
+ - 2018/07/22 (1.63) - changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecisions over time.
|
|
- 2018/07/08 (1.63) - style: renamed ImGuiCol_ModalWindowDarkening to ImGuiCol_ModalWindowDimBg for consistency with other features. Kept redirection enum (will obsolete).
|
|
- 2018/07/08 (1.63) - style: renamed ImGuiCol_ModalWindowDarkening to ImGuiCol_ModalWindowDimBg for consistency with other features. Kept redirection enum (will obsolete).
|
|
- 2018/07/06 (1.63) - removed per-window ImGuiWindowFlags_ResizeFromAnySide beta flag in favor of a global io.OptResizeWindowsFromEdges to enable the feature.
|
|
- 2018/07/06 (1.63) - removed per-window ImGuiWindowFlags_ResizeFromAnySide beta flag in favor of a global io.OptResizeWindowsFromEdges to enable the feature.
|
|
- 2018/06/06 (1.62) - renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set.
|
|
- 2018/06/06 (1.62) - renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set.
|
|
@@ -6655,15 +6655,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
|
|
|
// Collapse button
|
|
// Collapse button
|
|
if (!(flags & ImGuiWindowFlags_NoCollapse))
|
|
if (!(flags & ImGuiWindowFlags_NoCollapse))
|
|
- {
|
|
|
|
- ImGuiID id = window->GetID("#COLLAPSE");
|
|
|
|
- ImRect bb(window->Pos + style.FramePadding + ImVec2(1,1), window->Pos + style.FramePadding + ImVec2(g.FontSize,g.FontSize) - ImVec2(1,1));
|
|
|
|
- ItemAdd(bb, id);
|
|
|
|
- if (ButtonBehavior(bb, id, NULL, NULL))
|
|
|
|
|
|
+ if (CollapseButton(window->GetID("#COLLAPSE"), window->Pos + style.FramePadding))
|
|
window->CollapseToggleWanted = true; // Defer collapsing to next frame as we are too far in the Begin() function
|
|
window->CollapseToggleWanted = true; // Defer collapsing to next frame as we are too far in the Begin() function
|
|
- RenderNavHighlight(bb, id);
|
|
|
|
- RenderArrow(window->Pos + style.FramePadding, window->Collapsed ? ImGuiDir_Right : ImGuiDir_Down, 1.0f);
|
|
|
|
- }
|
|
|
|
|
|
|
|
// Close button
|
|
// Close button
|
|
if (p_open != NULL)
|
|
if (p_open != NULL)
|
|
@@ -8336,6 +8329,24 @@ bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos, float radius)
|
|
return pressed;
|
|
return pressed;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+bool ImGui::CollapseButton(ImGuiID id, const ImVec2& pos)
|
|
|
|
+{
|
|
|
|
+ ImGuiContext& g = *GImGui;
|
|
|
|
+ ImGuiWindow* window = g.CurrentWindow;
|
|
|
|
+
|
|
|
|
+ ImRect bb(pos, pos + ImVec2(g.FontSize, g.FontSize));
|
|
|
|
+ ItemAdd(bb, id);
|
|
|
|
+ bool ret = ButtonBehavior(bb, id, NULL, NULL, ImGuiButtonFlags_None);
|
|
|
|
+ RenderNavHighlight(bb, id);
|
|
|
|
+ RenderArrow(bb.Min, window->Collapsed ? ImGuiDir_Right : ImGuiDir_Down, 1.0f);
|
|
|
|
+
|
|
|
|
+ // Switch to moving the window after mouse is moved beyond the initial drag threshold
|
|
|
|
+ if (IsItemActive() && IsMouseDragging())
|
|
|
|
+ StartMouseMovingWindow(window);
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+
|
|
void ImGui::Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col)
|
|
void ImGui::Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col)
|
|
{
|
|
{
|
|
ImGuiWindow* window = GetCurrentWindow();
|
|
ImGuiWindow* window = GetCurrentWindow();
|