mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 15:50:25 +01:00
parent
ea493fd8da
commit
54bdd00df7
@ -10050,10 +10050,10 @@ void ImGui::BeginColumns(const char* id, int columns_count, ImGuiColumnsFlags fl
|
||||
window->DC.ColumnsCount = columns_count;
|
||||
window->DC.ColumnsFlags = flags;
|
||||
|
||||
const float content_region_width = (window->SizeContentsExplicit.x != 0.0f) ? window->SizeContentsExplicit.x : window->Size.x;
|
||||
const float content_region_width = (window->SizeContentsExplicit.x != 0.0f) ? (window->SizeContentsExplicit.x) : (window->Size.x -window->ScrollbarSizes.x);
|
||||
window->DC.ColumnsMinX = window->DC.IndentX - g.Style.ItemSpacing.x; // Lock our horizontal range
|
||||
//window->DC.ColumnsMaxX = content_region_width - window->Scroll.x -((window->Flags & ImGuiWindowFlags_NoScrollbar) ? 0 : g.Style.ScrollbarSize);// - window->WindowPadding().x;
|
||||
window->DC.ColumnsMaxX = content_region_width - window->Scroll.x - window->ScrollbarSizes.x;
|
||||
window->DC.ColumnsMaxX = content_region_width - window->Scroll.x;
|
||||
window->DC.ColumnsStartPosY = window->DC.CursorPos.y;
|
||||
window->DC.ColumnsStartMaxPosX = window->DC.CursorMaxPos.x;
|
||||
window->DC.ColumnsCellMinY = window->DC.ColumnsCellMaxY = window->DC.CursorPos.y;
|
||||
|
@ -1623,13 +1623,13 @@ void ImGui::ShowTestWindow(bool* p_open)
|
||||
|
||||
if (ImGui::TreeNode("Horizontal Scrolling"))
|
||||
{
|
||||
ImGui::SetNextWindowContentWidth(2000);
|
||||
ImGui::SetNextWindowContentWidth(1500);
|
||||
ImGui::BeginChild("##scrollingregion", ImVec2(0, 120), false, ImGuiWindowFlags_HorizontalScrollbar);
|
||||
ImGui::Columns(10);
|
||||
for (int i = 0; i < 20; i++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
ImGui::Text("Line %d Column %d", i, j);
|
||||
ImGui::Text("Line %d Column %d...", i, j);
|
||||
ImGui::NextColumn();
|
||||
}
|
||||
ImGui::Columns(1);
|
||||
|
Loading…
Reference in New Issue
Block a user