mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-12 07:49:55 +02:00
Merge remote-tracking branch 'origin' into 2015-07-cleanup
Conflicts: imgui.cpp
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// ImGui library v1.44 WIP
|
||||
// ImGui library v1.44 WIP
|
||||
// Main code & documentation
|
||||
|
||||
// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code.
|
||||
@ -8471,7 +8471,7 @@ float ImGui::GetColumnOffset(int column_index)
|
||||
const float t = window->DC.ColumnsOffsetsT[column_index];
|
||||
|
||||
const float min_x = window->DC.ColumnsStartX;
|
||||
const float max_x = window->Size.x - (g.Style.ScrollbarWidth);// - window->WindowPadding().x;
|
||||
const float max_x = window->Size.x - ((window->Flags & ImGuiWindowFlags_NoScrollbar) ? 0 : g.Style.ScrollbarWidth);// - window->WindowPadding().x;
|
||||
const float x = min_x + t * (max_x - min_x);
|
||||
return (float)(int)x;
|
||||
}
|
||||
@ -8487,7 +8487,7 @@ void ImGui::SetColumnOffset(int column_index, float offset)
|
||||
const ImGuiID column_id = window->DC.ColumnsSetID + ImGuiID(column_index);
|
||||
|
||||
const float min_x = window->DC.ColumnsStartX;
|
||||
const float max_x = window->Size.x - (g.Style.ScrollbarWidth);// - window->WindowPadding().x;
|
||||
const float max_x = window->Size.x - ((window->Flags & ImGuiWindowFlags_NoScrollbar) ? 0 : g.Style.ScrollbarWidth);// - window->WindowPadding().x;
|
||||
const float t = (offset - min_x) / (max_x - min_x);
|
||||
window->DC.StateStorage->SetFloat(column_id, t);
|
||||
window->DC.ColumnsOffsetsT[column_index] = t;
|
||||
@ -8896,6 +8896,8 @@ void ImGui::ShowMetricsWindow(bool* opened)
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//---- Include imgui_user.inl at the end of imgui.cpp
|
||||
//---- So you can include code that extends ImGui using its private data/functions.
|
||||
#ifdef IMGUI_INCLUDE_IMGUI_USER_INL
|
||||
|
Reference in New Issue
Block a user