@ -3581,13 +3581,9 @@ static const char* DebugNodeTableGetSizingPolicyDesc(ImGuiTableFlags sizing_poli
void ImGui : : DebugNodeTable ( ImGuiTable * table )
void ImGui : : DebugNodeTable ( ImGuiTable * table )
{
{
char buf [ 512 ] ;
const bool is_active = ( table - > LastFrameActive > = GetFrameCount ( ) - 2 ) ; // Note that fully clipped early out scrolling tables will appear as inactive here.
char * p = buf ;
const char * buf_end = buf + IM_ARRAYSIZE ( buf ) ;
const bool is_active = ( table - > LastFrameActive > = ImGui : : GetFrameCount ( ) - 2 ) ; // Note that fully clipped early out scrolling tables will appear as inactive here.
ImFormatString ( p , buf_end - p , " Table 0x%08X (%d columns, in '%s')%s " , table - > ID , table - > ColumnsCount , table - > OuterWindow - > Name , is_active ? " " : " *Inactive* " ) ;
if ( ! is_active ) { PushStyleColor ( ImGuiCol_Text , GetStyleColorVec4 ( ImGuiCol_TextDisabled ) ) ; }
if ( ! is_active ) { PushStyleColor ( ImGuiCol_Text , GetStyleColorVec4 ( ImGuiCol_TextDisabled ) ) ; }
bool open = TreeNode ( table , " %s " , buf ) ;
bool open = TreeNode ( table , " Table 0x%08X (%d columns, in '%s')%s " , table - > ID , table - > ColumnsCount , table - > OuterWindow - > Name , is_active ? " " : " *Inactive* " ) ;
if ( ! is_active ) { PopStyleColor ( ) ; }
if ( ! is_active ) { PopStyleColor ( ) ; }
if ( IsItemHovered ( ) )
if ( IsItemHovered ( ) )
GetForegroundDrawList ( ) - > AddRect ( table - > OuterRect . Min , table - > OuterRect . Max , IM_COL32 ( 255 , 255 , 0 , 255 ) ) ;
GetForegroundDrawList ( ) - > AddRect ( table - > OuterRect . Min , table - > OuterRect . Max , IM_COL32 ( 255 , 255 , 0 , 255 ) ) ;
@ -3596,7 +3592,7 @@ void ImGui::DebugNodeTable(ImGuiTable* table)
if ( ! open )
if ( ! open )
return ;
return ;
if ( table - > InstanceCurrent > 0 )
if ( table - > InstanceCurrent > 0 )
ImGui : : Text ( " ** %d instances of same table! Some data below will refer to last instance. " , table - > InstanceCurrent + 1 ) ;
Text ( " ** %d instances of same table! Some data below will refer to last instance. " , table - > InstanceCurrent + 1 ) ;
bool clear_settings = SmallButton ( " Clear settings " ) ;
bool clear_settings = SmallButton ( " Clear settings " ) ;
BulletText ( " OuterRect: Pos: (%.1f,%.1f) Size: (%.1f,%.1f) Sizing: '%s' " , table - > OuterRect . Min . x , table - > OuterRect . Min . y , table - > OuterRect . GetWidth ( ) , table - > OuterRect . GetHeight ( ) , DebugNodeTableGetSizingPolicyDesc ( table - > Flags ) ) ;
BulletText ( " OuterRect: Pos: (%.1f,%.1f) Size: (%.1f,%.1f) Sizing: '%s' " , table - > OuterRect . Min . x , table - > OuterRect . Min . y , table - > OuterRect . GetWidth ( ) , table - > OuterRect . GetHeight ( ) , DebugNodeTableGetSizingPolicyDesc ( table - > Flags ) ) ;
BulletText ( " ColumnsGivenWidth: %.1f, ColumnsAutoFitWidth: %.1f, InnerWidth: %.1f%s " , table - > ColumnsGivenWidth , table - > ColumnsAutoFitWidth , table - > InnerWidth , table - > InnerWidth = = 0.0f ? " (auto) " : " " ) ;
BulletText ( " ColumnsGivenWidth: %.1f, ColumnsAutoFitWidth: %.1f, InnerWidth: %.1f%s " , table - > ColumnsGivenWidth , table - > ColumnsAutoFitWidth , table - > InnerWidth , table - > InnerWidth = = 0.0f ? " (auto) " : " " ) ;
@ -3612,6 +3608,7 @@ void ImGui::DebugNodeTable(ImGuiTable* table)
{
{
ImGuiTableColumn * column = & table - > Columns [ n ] ;
ImGuiTableColumn * column = & table - > Columns [ n ] ;
const char * name = TableGetColumnName ( table , n ) ;
const char * name = TableGetColumnName ( table , n ) ;
char buf [ 512 ] ;
ImFormatString ( buf , IM_ARRAYSIZE ( buf ) ,
ImFormatString ( buf , IM_ARRAYSIZE ( buf ) ,
" Column %d order %d '%s': offset %+.2f to %+.2f%s \n "
" Column %d order %d '%s': offset %+.2f to %+.2f%s \n "
" Enabled: %d, VisibleX/Y: %d/%d, RequestOutput: %d, SkipItems: %d, DrawChannels: %d,%d \n "
" Enabled: %d, VisibleX/Y: %d/%d, RequestOutput: %d, SkipItems: %d, DrawChannels: %d,%d \n "