mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-13 18:50:58 +01:00
Comments, minor tidying up.
This commit is contained in:
parent
e63ebd997f
commit
cc3cce7567
@ -5570,6 +5570,7 @@ void ImGui::LabelText(const char* label, const char* fmt, ...)
|
|||||||
static inline bool IsWindowContentHoverable(ImGuiWindow* window)
|
static inline bool IsWindowContentHoverable(ImGuiWindow* window)
|
||||||
{
|
{
|
||||||
// An active popup disable hovering on other windows (apart from its own children)
|
// An active popup disable hovering on other windows (apart from its own children)
|
||||||
|
// FIXME-OPT: This could be cached/stored within the window.
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
if (ImGuiWindow* focused_window = g.FocusedWindow)
|
if (ImGuiWindow* focused_window = g.FocusedWindow)
|
||||||
if (ImGuiWindow* focused_root_window = focused_window->RootWindow)
|
if (ImGuiWindow* focused_root_window = focused_window->RootWindow)
|
||||||
@ -9846,7 +9847,8 @@ void ImGui::Columns(int columns_count, const char* id, bool border)
|
|||||||
{
|
{
|
||||||
float x = window->Pos.x + GetColumnOffset(i);
|
float x = window->Pos.x + GetColumnOffset(i);
|
||||||
const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(i);
|
const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(i);
|
||||||
const ImRect column_rect(ImVec2(x-4,y1),ImVec2(x+4,y2));
|
const float column_w = 4.0f;
|
||||||
|
const ImRect column_rect(ImVec2(x - column_w, y1), ImVec2(x + column_w, y2));
|
||||||
if (IsClippedEx(column_rect, &column_id, false))
|
if (IsClippedEx(column_rect, &column_id, false))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -9863,7 +9865,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border)
|
|||||||
if (held)
|
if (held)
|
||||||
{
|
{
|
||||||
if (g.ActiveIdIsJustActivated)
|
if (g.ActiveIdIsJustActivated)
|
||||||
g.ActiveIdClickOffset.x -= 4; // Store from center of column line (we used a 8 wide rect for columns clicking)
|
g.ActiveIdClickOffset.x -= column_w; // Store from center of column line (we used a 8 wide rect for columns clicking)
|
||||||
x = GetDraggedColumnOffset(i);
|
x = GetDraggedColumnOffset(i);
|
||||||
SetColumnOffset(i, x);
|
SetColumnOffset(i, x);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user