@ -1626,7 +1626,7 @@ void ImGui::ItemSize(const ImVec2& size, float text_offset_y)
const float line_height = ImMax ( window - > DC . CurrentLineHeight , size . y ) ;
const float text_base_offset = ImMax ( window - > DC . CurrentLineTextBaseOffset , text_offset_y ) ;
window - > DC . CursorPosPrevLine = ImVec2 ( window - > DC . CursorPos . x + size . x , window - > DC . CursorPos . y ) ;
window - > DC . CursorPos = ImVec2 ( ( float ) ( int ) ( window - > Pos . x + window - > DC . ColumnsStar tX + window - > DC . ColumnsOffsetX ) , ( float ) ( int ) ( window - > DC . CursorPos . y + line_height + g . Style . ItemSpacing . y ) ) ;
window - > DC . CursorPos = ImVec2 ( ( float ) ( int ) ( window - > Pos . x + window - > DC . Inden tX + window - > DC . ColumnsOffsetX ) , ( float ) ( int ) ( window - > DC . CursorPos . y + line_height + g . Style . ItemSpacing . y ) ) ;
window - > DC . CursorMaxPos . x = ImMax ( window - > DC . CursorMaxPos . x , window - > DC . CursorPosPrevLine . x ) ;
window - > DC . CursorMaxPos . y = ImMax ( window - > DC . CursorMaxPos . y , window - > DC . CursorPos . y ) ;
@ -3946,9 +3946,9 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
}
// Setup drawing context
window - > DC . ColumnsStar tX = 0.0f + window - > WindowPadding . x - window - > Scroll . x ;
window - > DC . Inden tX = 0.0f + window - > WindowPadding . x - window - > Scroll . x ;
window - > DC . ColumnsOffsetX = 0.0f ;
window - > DC . CursorStartPos = window - > Pos + ImVec2 ( window - > DC . ColumnsStar tX + window - > DC . ColumnsOffsetX , window - > TitleBarHeight ( ) + window - > MenuBarHeight ( ) + window - > WindowPadding . y - window - > Scroll . y ) ;
window - > DC . CursorStartPos = window - > Pos + ImVec2 ( window - > DC . Inden tX + window - > DC . ColumnsOffsetX , window - > TitleBarHeight ( ) + window - > MenuBarHeight ( ) + window - > WindowPadding . y - window - > Scroll . y ) ;
window - > DC . CursorPos = window - > DC . CursorStartPos ;
window - > DC . CursorPosPrevLine = window - > DC . CursorPos ;
window - > DC . CursorMaxPos = window - > DC . CursorStartPos ;
@ -8571,7 +8571,7 @@ void ImGui::Separator()
float x1 = window - > Pos . x ;
float x2 = window - > Pos . x + window - > Size . x ;
if ( ! window - > DC . GroupStack . empty ( ) )
x1 + = window - > DC . ColumnsStar tX;
x1 + = window - > DC . Inden tX;
const ImRect bb ( ImVec2 ( x1 , window - > DC . CursorPos . y ) , ImVec2 ( x2 , window - > DC . CursorPos . y ) ) ;
ItemSize ( ImVec2 ( 0.0f , 0.0f ) ) ; // NB: we don't provide our width so that it doesn't get feed back into AutoFit // FIXME: Height should be 1.0f not 0.0f ?
@ -8628,13 +8628,13 @@ void ImGui::BeginGroup()
ImGuiGroupData & group_data = window - > DC . GroupStack . back ( ) ;
group_data . BackupCursorPos = window - > DC . CursorPos ;
group_data . BackupCursorMaxPos = window - > DC . CursorMaxPos ;
group_data . Backup ColumnsStartX = window - > DC . ColumnsStar tX;
group_data . Backup IndentX = window - > DC . Inden tX;
group_data . BackupCurrentLineHeight = window - > DC . CurrentLineHeight ;
group_data . BackupCurrentLineTextBaseOffset = window - > DC . CurrentLineTextBaseOffset ;
group_data . BackupLogLinePosY = window - > DC . LogLinePosY ;
group_data . AdvanceCursor = true ;
window - > DC . ColumnsStar tX = window - > DC . CursorPos . x - window - > Pos . x ;
window - > DC . Inden tX = window - > DC . CursorPos . x - window - > Pos . x ;
window - > DC . CursorMaxPos = window - > DC . CursorPos ;
window - > DC . CurrentLineHeight = 0.0f ;
window - > DC . LogLinePosY = window - > DC . CursorPos . y - 9999.0f ;
@ -8657,7 +8657,7 @@ void ImGui::EndGroup()
window - > DC . CursorMaxPos = ImMax ( group_data . BackupCursorMaxPos , window - > DC . CursorMaxPos ) ;
window - > DC . CurrentLineHeight = group_data . BackupCurrentLineHeight ;
window - > DC . CurrentLineTextBaseOffset = group_data . BackupCurrentLineTextBaseOffset ;
window - > DC . ColumnsStartX = group_data . BackupColumnsStar tX;
window - > DC . IndentX = group_data . BackupInden tX;
window - > DC . LogLinePosY = window - > DC . CursorPos . y - 9999.0f ;
if ( group_data . AdvanceCursor )
@ -8717,7 +8717,7 @@ void ImGui::NextColumn()
window - > DC . ColumnsCellMaxY = ImMax ( window - > DC . ColumnsCellMaxY , window - > DC . CursorPos . y ) ;
if ( + + window - > DC . ColumnsCurrent < window - > DC . ColumnsCount )
{
window - > DC . ColumnsOffsetX = ImGui : : GetColumnOffset ( window - > DC . ColumnsCurrent ) - window - > DC . ColumnsStar tX + g . Style . ItemSpacing . x ;
window - > DC . ColumnsOffsetX = ImGui : : GetColumnOffset ( window - > DC . ColumnsCurrent ) - window - > DC . Inden tX + g . Style . ItemSpacing . x ;
window - > DrawList - > ChannelsSetCurrent ( window - > DC . ColumnsCurrent ) ;
}
else
@ -8727,7 +8727,7 @@ void ImGui::NextColumn()
window - > DC . ColumnsCellMinY = window - > DC . ColumnsCellMaxY ;
window - > DrawList - > ChannelsSetCurrent ( 0 ) ;
}
window - > DC . CursorPos . x = ( float ) ( int ) ( window - > Pos . x + window - > DC . ColumnsStar tX + window - > DC . ColumnsOffsetX ) ;
window - > DC . CursorPos . x = ( float ) ( int ) ( window - > Pos . x + window - > DC . Inden tX + window - > DC . ColumnsOffsetX ) ;
window - > DC . CursorPos . y = window - > DC . ColumnsCellMinY ;
window - > DC . CurrentLineHeight = 0.0f ;
window - > DC . CurrentLineTextBaseOffset = 0.0f ;
@ -8783,7 +8783,7 @@ float ImGui::GetColumnOffset(int column_index)
const float t = window - > DC . ColumnsOffsetsT [ column_index ] ;
const float content_region_width = window - > SizeContentsExplicit . x ? window - > SizeContentsExplicit . x : window - > Size . x ;
const float min_x = window - > DC . ColumnsStar tX;
const float min_x = window - > DC . Inden tX;
const float max_x = content_region_width - window - > Scroll . x - ( ( window - > Flags & ImGuiWindowFlags_NoScrollbar ) ? 0 : g . Style . ScrollbarSize ) ; // - window->WindowPadding().x;
const float x = min_x + t * ( max_x - min_x ) ;
return ( float ) ( int ) x ;
@ -8800,7 +8800,7 @@ void ImGui::SetColumnOffset(int column_index, float offset)
const ImGuiID column_id = window - > DC . ColumnsSetID + ImGuiID ( column_index ) ;
const float content_region_width = window - > SizeContentsExplicit . x ? window - > SizeContentsExplicit . x : window - > Size . x ;
const float min_x = window - > DC . ColumnsStar tX;
const float min_x = window - > DC . Inden tX;
const float max_x = content_region_width - window - > Scroll . x - ( ( window - > Flags & ImGuiWindowFlags_NoScrollbar ) ? 0 : g . Style . ScrollbarSize ) ; // - window->WindowPadding().x;
const float t = ( offset - min_x ) / ( max_x - min_x ) ;
window - > DC . StateStorage - > SetFloat ( column_id , t ) ;
@ -8889,7 +8889,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border)
window - > DC . ColumnsStartPos = window - > DC . CursorPos ;
window - > DC . ColumnsCellMinY = window - > DC . ColumnsCellMaxY = window - > DC . CursorPos . y ;
window - > DC . ColumnsOffsetX = 0.0f ;
window - > DC . CursorPos . x = ( float ) ( int ) ( window - > Pos . x + window - > DC . ColumnsStar tX + window - > DC . ColumnsOffsetX ) ;
window - > DC . CursorPos . x = ( float ) ( int ) ( window - > Pos . x + window - > DC . Inden tX + window - > DC . ColumnsOffsetX ) ;
if ( window - > DC . ColumnsCount ! = 1 )
{
@ -8919,16 +8919,16 @@ void ImGui::Indent()
{
ImGuiState & g = * GImGui ;
ImGuiWindow * window = GetCurrentWindow ( ) ;
window - > DC . ColumnsStar tX + = g . Style . IndentSpacing ;
window - > DC . CursorPos . x = window - > Pos . x + window - > DC . ColumnsStar tX + window - > DC . ColumnsOffsetX ;
window - > DC . Inden tX + = g . Style . IndentSpacing ;
window - > DC . CursorPos . x = window - > Pos . x + window - > DC . Inden tX + window - > DC . ColumnsOffsetX ;
}
void ImGui : : Unindent ( )
{
ImGuiState & g = * GImGui ;
ImGuiWindow * window = GetCurrentWindow ( ) ;
window - > DC . ColumnsStar tX - = g . Style . IndentSpacing ;
window - > DC . CursorPos . x = window - > Pos . x + window - > DC . ColumnsStar tX + window - > DC . ColumnsOffsetX ;
window - > DC . Inden tX - = g . Style . IndentSpacing ;
window - > DC . CursorPos . x = window - > Pos . x + window - > DC . Inden tX + window - > DC . ColumnsOffsetX ;
}
void ImGui : : TreePush ( const char * str_id )