Tables: Internals: Added FindTableByID(), removing trailing spaces.

# Conflicts:
#	imgui_internal.h
This commit is contained in:
omar 2020-04-15 11:05:50 +02:00 committed by ocornut
parent e60b5a3f75
commit 8eb1c925f0
3 changed files with 13 additions and 6 deletions

View File

@ -2246,6 +2246,7 @@ namespace ImGui
IMGUI_API float GetColumnNormFromOffset(const ImGuiOldColumns* columns, float offset); IMGUI_API float GetColumnNormFromOffset(const ImGuiOldColumns* columns, float offset);
// Tables // Tables
IMGUI_API ImGuiTable* FindTableByID(ImGuiID id);
IMGUI_API bool BeginTableEx(const char* name, ImGuiID id, int columns_count, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0, 0), float inner_width = 0.0f); IMGUI_API bool BeginTableEx(const char* name, ImGuiID id, int columns_count, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0, 0), float inner_width = 0.0f);
IMGUI_API void TableBeginUpdateColumns(ImGuiTable* table); IMGUI_API void TableBeginUpdateColumns(ImGuiTable* table);
IMGUI_API void TableUpdateDrawChannels(ImGuiTable* table); IMGUI_API void TableUpdateDrawChannels(ImGuiTable* table);

View File

@ -127,6 +127,12 @@ inline ImGuiTableFlags TableFixFlags(ImGuiTableFlags flags)
return flags; return flags;
} }
ImGuiTable* ImGui::FindTableByID(ImGuiID id)
{
ImGuiContext& g = *GImGui;
return g.Tables.GetByKey(id);
}
// About 'outer_size': // About 'outer_size':
// The meaning of outer_size needs to differ slightly depending of if we are using ScrollX/ScrollY flags. // The meaning of outer_size needs to differ slightly depending of if we are using ScrollX/ScrollY flags.
// With ScrollX/ScrollY: using a child window for scrolling: // With ScrollX/ScrollY: using a child window for scrolling: