mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-24 00:26:36 +00:00
Exposed PushMultiItemsWidths() to imgui_internal.h
This commit is contained in:
parent
24f21bd4d4
commit
69d0d33451
@ -592,7 +592,6 @@
|
||||
|
||||
static void LogRenderedText(const ImVec2& ref_pos, const char* text, const char* text_end = NULL);
|
||||
|
||||
static void PushMultiItemsWidths(int components, float w_full = 0.0f);
|
||||
static float GetDraggedColumnOffset(int column_index);
|
||||
|
||||
static bool IsKeyPressedMap(ImGuiKey key, bool repeat = true);
|
||||
@ -4676,12 +4675,12 @@ void ImGui::PushItemWidth(float item_width)
|
||||
window->DC.ItemWidthStack.push_back(window->DC.ItemWidth);
|
||||
}
|
||||
|
||||
static void PushMultiItemsWidths(int components, float w_full)
|
||||
void ImGui::PushMultiItemsWidths(int components, float w_full)
|
||||
{
|
||||
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
const ImGuiStyle& style = GImGui->Style;
|
||||
if (w_full <= 0.0f)
|
||||
w_full = ImGui::CalcItemWidth();
|
||||
w_full = CalcItemWidth();
|
||||
const float w_item_one = ImMax(1.0f, (float)(int)((w_full - (style.ItemInnerSpacing.x) * (components-1)) / (float)components));
|
||||
const float w_item_last = ImMax(1.0f, (float)(int)(w_full - (w_item_one + style.ItemInnerSpacing.x) * (components-1)));
|
||||
window->DC.ItemWidthStack.push_back(w_item_last);
|
||||
|
@ -772,6 +772,7 @@ namespace ImGui
|
||||
IMGUI_API void FocusableItemUnregister(ImGuiWindow* window);
|
||||
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_x, float default_y);
|
||||
IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
|
||||
IMGUI_API void PushMultiItemsWidths(int components, float width_full = 0.0f);
|
||||
IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled);
|
||||
IMGUI_API void PopItemFlag();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user