|
@@ -595,8 +595,6 @@
|
|
|
// Forward Declarations
|
|
// Forward Declarations
|
|
|
//-------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-static void LogRenderedText(const ImVec2& ref_pos, const char* text, const char* text_end = NULL);
|
|
|
|
|
-
|
|
|
|
|
static float GetDraggedColumnOffset(int column_index);
|
|
static float GetDraggedColumnOffset(int column_index);
|
|
|
|
|
|
|
|
static bool IsKeyPressedMap(ImGuiKey key, bool repeat = true);
|
|
static bool IsKeyPressedMap(ImGuiKey key, bool repeat = true);
|
|
@@ -1957,12 +1955,16 @@ bool ImGui::ItemAdd(const ImRect& bb, const ImGuiID* id)
|
|
|
{
|
|
{
|
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiContext& g = *GImGui;
|
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
|
|
|
+ const bool is_clipped = IsClippedEx(bb, id, false);
|
|
|
window->DC.LastItemId = id ? *id : 0;
|
|
window->DC.LastItemId = id ? *id : 0;
|
|
|
window->DC.LastItemRect = bb;
|
|
window->DC.LastItemRect = bb;
|
|
|
- if (IsClippedEx(bb, id, false))
|
|
|
|
|
|
|
+ window->DC.LastItemRectHoveredRect = false;
|
|
|
|
|
+ if (is_clipped)
|
|
|
return false;
|
|
return false;
|
|
|
//if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG]
|
|
//if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG]
|
|
|
|
|
|
|
|
|
|
+ // We need to calculate this now to take account of the current clipping rectangle (as items like Selectable may change them)
|
|
|
|
|
+ window->DC.LastItemRectHoveredRect = IsMouseHoveringRect(bb.Min, bb.Max);
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1973,12 +1975,12 @@ bool ImGui::IsItemHovered()
|
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiContext& g = *GImGui;
|
|
|
|
|
|
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
|
|
|
+ if (!window->DC.LastItemRectHoveredRect)
|
|
|
|
|
+ return false;
|
|
|
if (g.HoveredWindow != window)
|
|
if (g.HoveredWindow != window)
|
|
|
return false;
|
|
return false;
|
|
|
if (g.ActiveId != 0 && g.ActiveId != window->DC.LastItemId && !g.ActiveIdAllowOverlap && g.ActiveId != window->MoveId)
|
|
if (g.ActiveId != 0 && g.ActiveId != window->DC.LastItemId && !g.ActiveIdAllowOverlap && g.ActiveId != window->MoveId)
|
|
|
return false;
|
|
return false;
|
|
|
- if (!IsMouseHoveringRect(window->DC.LastItemRect.Min, window->DC.LastItemRect.Max))
|
|
|
|
|
- return false;
|
|
|
|
|
if (!IsWindowContentHoverable(window))
|
|
if (!IsWindowContentHoverable(window))
|
|
|
return false;
|
|
return false;
|
|
|
return true;
|
|
return true;
|
|
@@ -1987,7 +1989,7 @@ bool ImGui::IsItemHovered()
|
|
|
bool ImGui::IsItemRectHovered()
|
|
bool ImGui::IsItemRectHovered()
|
|
|
{
|
|
{
|
|
|
ImGuiWindow* window = GetCurrentWindowRead();
|
|
ImGuiWindow* window = GetCurrentWindowRead();
|
|
|
- return IsMouseHoveringRect(window->DC.LastItemRect.Min, window->DC.LastItemRect.Max);
|
|
|
|
|
|
|
+ return window->DC.LastItemRectHoveredRect;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Internal facing ItemHoverable() used when submitting widgets. Differs slightly from IsItemHovered().
|
|
// Internal facing ItemHoverable() used when submitting widgets. Differs slightly from IsItemHovered().
|
|
@@ -2871,7 +2873,7 @@ void ImGui::LogText(const char* fmt, ...)
|
|
|
|
|
|
|
|
// Internal version that takes a position to decide on newline placement and pad items according to their depth.
|
|
// Internal version that takes a position to decide on newline placement and pad items according to their depth.
|
|
|
// We split text into individual lines to add current tree level padding
|
|
// We split text into individual lines to add current tree level padding
|
|
|
-static void LogRenderedText(const ImVec2& ref_pos, const char* text, const char* text_end)
|
|
|
|
|
|
|
+static void LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end = NULL)
|
|
|
{
|
|
{
|
|
|
ImGuiContext& g = *GImGui;
|
|
ImGuiContext& g = *GImGui;
|
|
|
ImGuiWindow* window = ImGui::GetCurrentWindowRead();
|
|
ImGuiWindow* window = ImGui::GetCurrentWindowRead();
|
|
@@ -2879,8 +2881,9 @@ static void LogRenderedText(const ImVec2& ref_pos, const char* text, const char*
|
|
|
if (!text_end)
|
|
if (!text_end)
|
|
|
text_end = ImGui::FindRenderedTextEnd(text, text_end);
|
|
text_end = ImGui::FindRenderedTextEnd(text, text_end);
|
|
|
|
|
|
|
|
- const bool log_new_line = ref_pos.y > window->DC.LogLinePosY+1;
|
|
|
|
|
- window->DC.LogLinePosY = ref_pos.y;
|
|
|
|
|
|
|
+ const bool log_new_line = ref_pos && (ref_pos->y > window->DC.LogLinePosY + 1);
|
|
|
|
|
+ if (ref_pos)
|
|
|
|
|
+ window->DC.LogLinePosY = ref_pos->y;
|
|
|
|
|
|
|
|
const char* text_remaining = text;
|
|
const char* text_remaining = text;
|
|
|
if (g.LogStartDepth > window->DC.TreeDepth) // Re-adjust padding if we have popped out of our starting depth
|
|
if (g.LogStartDepth > window->DC.TreeDepth) // Re-adjust padding if we have popped out of our starting depth
|
|
@@ -2945,7 +2948,7 @@ void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool
|
|
|
{
|
|
{
|
|
|
window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end);
|
|
window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end);
|
|
|
if (g.LogEnabled)
|
|
if (g.LogEnabled)
|
|
|
- LogRenderedText(pos, text, text_display_end);
|
|
|
|
|
|
|
+ LogRenderedText(&pos, text, text_display_end);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2962,7 +2965,7 @@ void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end
|
|
|
{
|
|
{
|
|
|
window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
|
|
window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
|
|
|
if (g.LogEnabled)
|
|
if (g.LogEnabled)
|
|
|
- LogRenderedText(pos, text, text_end);
|
|
|
|
|
|
|
+ LogRenderedText(&pos, text, text_end);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -3004,7 +3007,7 @@ void ImGui::RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, cons
|
|
|
window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end, 0.0f, NULL);
|
|
window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end, 0.0f, NULL);
|
|
|
}
|
|
}
|
|
|
if (g.LogEnabled)
|
|
if (g.LogEnabled)
|
|
|
- LogRenderedText(pos, text, text_display_end);
|
|
|
|
|
|
|
+ LogRenderedText(&pos, text, text_display_end);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Render a rectangle shaped with optional rounding and borders
|
|
// Render a rectangle shaped with optional rounding and borders
|
|
@@ -4289,7 +4292,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|
|
if (window->Collapsed)
|
|
if (window->Collapsed)
|
|
|
{
|
|
{
|
|
|
// Title bar only
|
|
// Title bar only
|
|
|
- RenderFrame(title_bar_rect.GetTL(), title_bar_rect.GetBR(), GetColorU32(ImGuiCol_TitleBgCollapsed), true, window_rounding);
|
|
|
|
|
|
|
+ RenderFrame(title_bar_rect.Min, title_bar_rect.Max, GetColorU32(ImGuiCol_TitleBgCollapsed), true, window_rounding);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
@@ -4450,6 +4453,12 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|
|
// Title bar
|
|
// Title bar
|
|
|
if (!(flags & ImGuiWindowFlags_NoTitleBar))
|
|
if (!(flags & ImGuiWindowFlags_NoTitleBar))
|
|
|
{
|
|
{
|
|
|
|
|
+ // Collapse button
|
|
|
|
|
+ if (!(flags & ImGuiWindowFlags_NoCollapse))
|
|
|
|
|
+ {
|
|
|
|
|
+ RenderCollapseTriangle(window->Pos + style.FramePadding, !window->Collapsed, 1.0f);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// Close button
|
|
// Close button
|
|
|
if (p_open != NULL)
|
|
if (p_open != NULL)
|
|
|
{
|
|
{
|
|
@@ -4459,10 +4468,8 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|
|
*p_open = false;
|
|
*p_open = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // Title text (FIXME: refactor text alignment facilities along with RenderText helpers)
|
|
|
const ImVec2 text_size = CalcTextSize(name, NULL, true);
|
|
const ImVec2 text_size = CalcTextSize(name, NULL, true);
|
|
|
- if (!(flags & ImGuiWindowFlags_NoCollapse))
|
|
|
|
|
- RenderCollapseTriangle(window->Pos + style.FramePadding, !window->Collapsed, 1.0f);
|
|
|
|
|
-
|
|
|
|
|
ImVec2 text_min = window->Pos;
|
|
ImVec2 text_min = window->Pos;
|
|
|
ImVec2 text_max = window->Pos + ImVec2(window->Size.x, style.FramePadding.y*2 + text_size.y);
|
|
ImVec2 text_max = window->Pos + ImVec2(window->Size.x, style.FramePadding.y*2 + text_size.y);
|
|
|
ImRect clip_rect;
|
|
ImRect clip_rect;
|
|
@@ -6150,9 +6157,9 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|
|
// NB: '##' is normally used to hide text (as a library-wide feature), so we need to specify the text range to make sure the ## aren't stripped out here.
|
|
// NB: '##' is normally used to hide text (as a library-wide feature), so we need to specify the text range to make sure the ## aren't stripped out here.
|
|
|
const char log_prefix[] = "\n##";
|
|
const char log_prefix[] = "\n##";
|
|
|
const char log_suffix[] = "##";
|
|
const char log_suffix[] = "##";
|
|
|
- LogRenderedText(text_pos, log_prefix, log_prefix+3);
|
|
|
|
|
|
|
+ LogRenderedText(&text_pos, log_prefix, log_prefix+3);
|
|
|
RenderTextClipped(text_pos, bb.Max, label, label_end, &label_size);
|
|
RenderTextClipped(text_pos, bb.Max, label, label_end, &label_size);
|
|
|
- LogRenderedText(text_pos, log_suffix+1, log_suffix+3);
|
|
|
|
|
|
|
+ LogRenderedText(&text_pos, log_suffix+1, log_suffix+3);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
@@ -6170,7 +6177,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|
|
else if (!(flags & ImGuiTreeNodeFlags_Leaf))
|
|
else if (!(flags & ImGuiTreeNodeFlags_Leaf))
|
|
|
RenderCollapseTriangle(bb.Min + ImVec2(padding.x, g.FontSize*0.15f + text_base_offset_y), is_open, 0.70f);
|
|
RenderCollapseTriangle(bb.Min + ImVec2(padding.x, g.FontSize*0.15f + text_base_offset_y), is_open, 0.70f);
|
|
|
if (g.LogEnabled)
|
|
if (g.LogEnabled)
|
|
|
- LogRenderedText(text_pos, ">");
|
|
|
|
|
|
|
+ LogRenderedText(&text_pos, ">");
|
|
|
RenderText(text_pos, label, label_end, false);
|
|
RenderText(text_pos, label, label_end, false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -6982,6 +6989,7 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
|
|
|
|
|
|
|
|
if (v_speed == 0.0f && (v_max - v_min) != 0.0f && (v_max - v_min) < FLT_MAX)
|
|
if (v_speed == 0.0f && (v_max - v_min) != 0.0f && (v_max - v_min) < FLT_MAX)
|
|
|
v_speed = (v_max - v_min) * g.DragSpeedDefaultRatio;
|
|
v_speed = (v_max - v_min) * g.DragSpeedDefaultRatio;
|
|
|
|
|
+
|
|
|
float v_cur = g.DragCurrentValue;
|
|
float v_cur = g.DragCurrentValue;
|
|
|
const ImVec2 mouse_drag_delta = GetMouseDragDelta(0, 1.0f);
|
|
const ImVec2 mouse_drag_delta = GetMouseDragDelta(0, 1.0f);
|
|
|
float adjust_delta = 0.0f;
|
|
float adjust_delta = 0.0f;
|
|
@@ -7463,9 +7471,9 @@ bool ImGui::Checkbox(const char* label, bool* v)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (g.LogEnabled)
|
|
if (g.LogEnabled)
|
|
|
- LogRenderedText(text_bb.GetTL(), *v ? "[x]" : "[ ]");
|
|
|
|
|
|
|
+ LogRenderedText(&text_bb.Min, *v ? "[x]" : "[ ]");
|
|
|
if (label_size.x > 0.0f)
|
|
if (label_size.x > 0.0f)
|
|
|
- RenderText(text_bb.GetTL(), label);
|
|
|
|
|
|
|
+ RenderText(text_bb.Min, label);
|
|
|
|
|
|
|
|
return pressed;
|
|
return pressed;
|
|
|
}
|
|
}
|
|
@@ -7535,9 +7543,9 @@ bool ImGui::RadioButton(const char* label, bool active)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (g.LogEnabled)
|
|
if (g.LogEnabled)
|
|
|
- LogRenderedText(text_bb.GetTL(), active ? "(x)" : "( )");
|
|
|
|
|
|
|
+ LogRenderedText(&text_bb.Min, active ? "(x)" : "( )");
|
|
|
if (label_size.x > 0.0f)
|
|
if (label_size.x > 0.0f)
|
|
|
- RenderText(text_bb.GetTL(), label);
|
|
|
|
|
|
|
+ RenderText(text_bb.Min, label);
|
|
|
|
|
|
|
|
return pressed;
|
|
return pressed;
|
|
|
}
|
|
}
|
|
@@ -8380,7 +8388,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
|
|
|
|
|
|
|
// Log as text
|
|
// Log as text
|
|
|
if (g.LogEnabled && !is_password)
|
|
if (g.LogEnabled && !is_password)
|
|
|
- LogRenderedText(render_pos, buf_display, NULL);
|
|
|
|
|
|
|
+ LogRenderedText(&render_pos, buf_display, NULL);
|
|
|
|
|
|
|
|
if (label_size.x > 0)
|
|
if (label_size.x > 0)
|
|
|
RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
|
|
RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label);
|
|
@@ -8816,7 +8824,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
|
|
|
if (flags & ImGuiSelectableFlags_Disabled) PopStyleColor();
|
|
if (flags & ImGuiSelectableFlags_Disabled) PopStyleColor();
|
|
|
|
|
|
|
|
// Automatically close popups
|
|
// Automatically close popups
|
|
|
- if (pressed && !(flags & ImGuiSelectableFlags_DontClosePopups) && (window->Flags & ImGuiWindowFlags_Popup))
|
|
|
|
|
|
|
+ if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(window->DC.ItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
|
|
|
CloseCurrentPopup();
|
|
CloseCurrentPopup();
|
|
|
return pressed;
|
|
return pressed;
|
|
|
}
|
|
}
|
|
@@ -9882,65 +9890,70 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl
|
|
|
// Horizontal separating line.
|
|
// Horizontal separating line.
|
|
|
void ImGui::Separator()
|
|
void ImGui::Separator()
|
|
|
{
|
|
{
|
|
|
- ImGuiContext& g = *GImGui;
|
|
|
|
|
ImGuiWindow* window = GetCurrentWindow();
|
|
ImGuiWindow* window = GetCurrentWindow();
|
|
|
if (window->SkipItems)
|
|
if (window->SkipItems)
|
|
|
return;
|
|
return;
|
|
|
|
|
+ ImGuiContext& g = *GImGui;
|
|
|
|
|
|
|
|
ImGuiWindowFlags flags = 0;
|
|
ImGuiWindowFlags flags = 0;
|
|
|
if ((flags & (ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical)) == 0)
|
|
if ((flags & (ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical)) == 0)
|
|
|
- {
|
|
|
|
|
- if (window->DC.LayoutType == ImGuiLayoutType_Horizontal)
|
|
|
|
|
- flags |= ImGuiSeparatorFlags_Vertical;
|
|
|
|
|
- else
|
|
|
|
|
- flags |= ImGuiSeparatorFlags_Horizontal;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ flags |= (window->DC.LayoutType == ImGuiLayoutType_Horizontal) ? ImGuiSeparatorFlags_Vertical : ImGuiSeparatorFlags_Horizontal;
|
|
|
IM_ASSERT(ImIsPowerOfTwo((int)(flags & (ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical)))); // Check that only 1 option is selected
|
|
IM_ASSERT(ImIsPowerOfTwo((int)(flags & (ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical)))); // Check that only 1 option is selected
|
|
|
-
|
|
|
|
|
- if (flags & ImGuiSeparatorFlags_Horizontal)
|
|
|
|
|
|
|
+ if (flags & ImGuiSeparatorFlags_Vertical)
|
|
|
{
|
|
{
|
|
|
- if (window->DC.ColumnsCount > 1)
|
|
|
|
|
- PopClipRect();
|
|
|
|
|
-
|
|
|
|
|
- float x1 = window->Pos.x;
|
|
|
|
|
- float x2 = window->Pos.x + window->Size.x;
|
|
|
|
|
- if (!window->DC.GroupStack.empty())
|
|
|
|
|
- x1 += window->DC.IndentX;
|
|
|
|
|
-
|
|
|
|
|
- const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y+1.0f));
|
|
|
|
|
- ItemSize(ImVec2(0.0f, 0.0f)); // NB: we don't provide our width so that it doesn't get feed back into AutoFit, we don't provide height to not alter layout.
|
|
|
|
|
- if (!ItemAdd(bb, NULL))
|
|
|
|
|
- {
|
|
|
|
|
- if (window->DC.ColumnsCount > 1)
|
|
|
|
|
- PushColumnClipRect();
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ VerticalSeparator();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- window->DrawList->AddLine(bb.Min, ImVec2(bb.Max.x,bb.Min.y), GetColorU32(ImGuiCol_Separator));
|
|
|
|
|
|
|
+ // Horizontal Separator
|
|
|
|
|
+ if (window->DC.ColumnsCount > 1)
|
|
|
|
|
+ PopClipRect();
|
|
|
|
|
|
|
|
- if (g.LogEnabled)
|
|
|
|
|
- LogText(IM_NEWLINE "--------------------------------");
|
|
|
|
|
|
|
+ float x1 = window->Pos.x;
|
|
|
|
|
+ float x2 = window->Pos.x + window->Size.x;
|
|
|
|
|
+ if (!window->DC.GroupStack.empty())
|
|
|
|
|
+ x1 += window->DC.IndentX;
|
|
|
|
|
|
|
|
|
|
+ const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y+1.0f));
|
|
|
|
|
+ ItemSize(ImVec2(0.0f, 0.0f)); // NB: we don't provide our width so that it doesn't get feed back into AutoFit, we don't provide height to not alter layout.
|
|
|
|
|
+ if (!ItemAdd(bb, NULL))
|
|
|
|
|
+ {
|
|
|
if (window->DC.ColumnsCount > 1)
|
|
if (window->DC.ColumnsCount > 1)
|
|
|
- {
|
|
|
|
|
PushColumnClipRect();
|
|
PushColumnClipRect();
|
|
|
- window->DC.ColumnsCellMinY = window->DC.CursorPos.y;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
- else if (flags & ImGuiSeparatorFlags_Vertical)
|
|
|
|
|
- {
|
|
|
|
|
- const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(1.0f, window->DC.CurrentLineHeight));
|
|
|
|
|
- ItemSize(ImVec2(bb.GetWidth(), 0.0f));
|
|
|
|
|
- if (!ItemAdd(bb, NULL))
|
|
|
|
|
- return;
|
|
|
|
|
|
|
|
|
|
- window->DrawList->AddLine(ImVec2(bb.Min.x, bb.Min.y), ImVec2(bb.Min.x, bb.Max.y), GetColorU32(ImGuiCol_Separator));
|
|
|
|
|
|
|
+ window->DrawList->AddLine(bb.Min, ImVec2(bb.Max.x,bb.Min.y), GetColorU32(ImGuiCol_Separator));
|
|
|
|
|
|
|
|
- if (g.LogEnabled)
|
|
|
|
|
- LogText("|");
|
|
|
|
|
|
|
+ if (g.LogEnabled)
|
|
|
|
|
+ LogRenderedText(NULL, IM_NEWLINE "--------------------------------");
|
|
|
|
|
+
|
|
|
|
|
+ if (window->DC.ColumnsCount > 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ PushColumnClipRect();
|
|
|
|
|
+ window->DC.ColumnsCellMinY = window->DC.CursorPos.y;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void ImGui::VerticalSeparator()
|
|
|
|
|
+{
|
|
|
|
|
+ ImGuiWindow* window = GetCurrentWindow();
|
|
|
|
|
+ if (window->SkipItems)
|
|
|
|
|
+ return;
|
|
|
|
|
+ ImGuiContext& g = *GImGui;
|
|
|
|
|
+
|
|
|
|
|
+ float y1 = window->DC.CursorPos.y;
|
|
|
|
|
+ float y2 = window->DC.CursorPos.y + window->DC.CurrentLineHeight;
|
|
|
|
|
+ const ImRect bb(ImVec2(window->DC.CursorPos.x, y1), ImVec2(window->DC.CursorPos.x + 1.0f, y2));
|
|
|
|
|
+ ItemSize(ImVec2(bb.GetWidth(), 0.0f));
|
|
|
|
|
+ if (!ItemAdd(bb, NULL))
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
|
|
+ window->DrawList->AddLine(ImVec2(bb.Min.x, bb.Min.y), ImVec2(bb.Min.x, bb.Max.y), GetColorU32(ImGuiCol_Separator));
|
|
|
|
|
+ if (g.LogEnabled)
|
|
|
|
|
+ LogText(" |");
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void ImGui::Spacing()
|
|
void ImGui::Spacing()
|
|
|
{
|
|
{
|
|
|
ImGuiWindow* window = GetCurrentWindow();
|
|
ImGuiWindow* window = GetCurrentWindow();
|