mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
This commit is contained in:
parent
e70d49ba1f
commit
7f0063f858
@ -10100,7 +10100,9 @@ void ImGui::EndColumns()
|
|||||||
if (IsClippedEx(column_rect, &column_id, false))
|
if (IsClippedEx(column_rect, &column_id, false))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool hovered, held;
|
bool hovered = false, held = false;
|
||||||
|
if (!(window->DC.ColumnsFlags & ImGuiColumnsFlags_NoResize))
|
||||||
|
{
|
||||||
ButtonBehavior(column_rect, column_id, &hovered, &held);
|
ButtonBehavior(column_rect, column_id, &hovered, &held);
|
||||||
if (hovered || held)
|
if (hovered || held)
|
||||||
g.MouseCursor = ImGuiMouseCursor_ResizeEW;
|
g.MouseCursor = ImGuiMouseCursor_ResizeEW;
|
||||||
@ -10108,6 +10110,7 @@ void ImGui::EndColumns()
|
|||||||
g.ActiveIdClickOffset.x -= column_w; // Store from center of column line (we used a 8 wide rect for columns clicking). This is used by GetDraggedColumnOffset().
|
g.ActiveIdClickOffset.x -= column_w; // Store from center of column line (we used a 8 wide rect for columns clicking). This is used by GetDraggedColumnOffset().
|
||||||
if (held)
|
if (held)
|
||||||
dragging_column = i;
|
dragging_column = i;
|
||||||
|
}
|
||||||
|
|
||||||
// Draw column
|
// Draw column
|
||||||
const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : hovered ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator);
|
const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : hovered ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator);
|
||||||
|
@ -187,8 +187,9 @@ enum ImGuiColumnsFlags_
|
|||||||
{
|
{
|
||||||
// Default: 0
|
// Default: 0
|
||||||
ImGuiColumnsFlags_NoBorder = 1 << 0, // Disable column dividers
|
ImGuiColumnsFlags_NoBorder = 1 << 0, // Disable column dividers
|
||||||
ImGuiColumnsFlags_NoPreserveWidths = 1 << 1, // Disable column width preservation when adjusting columns
|
ImGuiColumnsFlags_NoResize = 1 << 1, // Disable resizing columns when clicking on the dividers
|
||||||
ImGuiColumnsFlags_NoForceWithinWindow = 1 << 2 // Disable forcing columns to fit within window
|
ImGuiColumnsFlags_NoPreserveWidths = 1 << 2, // Disable column width preservation when adjusting columns
|
||||||
|
ImGuiColumnsFlags_NoForceWithinWindow = 1 << 3 // Disable forcing columns to fit within window
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ImGuiSelectableFlagsPrivate_
|
enum ImGuiSelectableFlagsPrivate_
|
||||||
|
Loading…
Reference in New Issue
Block a user