mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 20:08:31 +01:00
update to imgui v1.48
This commit is contained in:
@@ -119,21 +119,6 @@ CIMGUI_API ImDrawList* igGetWindowDrawList()
|
||||
return ImGui::GetWindowDrawList();
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* igGetWindowFont()
|
||||
{
|
||||
return ImGui::GetWindowFont();
|
||||
}
|
||||
|
||||
CIMGUI_API float igGetWindowFontSize()
|
||||
{
|
||||
return ImGui::GetWindowFontSize();
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetWindowFontScale(float scale)
|
||||
{
|
||||
ImGui::SetWindowFontScale(scale);
|
||||
}
|
||||
|
||||
CIMGUI_API void igGetWindowPos(ImVec2* out)
|
||||
{
|
||||
*out = ImGui::GetWindowPos();
|
||||
@@ -159,6 +144,11 @@ CIMGUI_API bool igIsWindowCollapsed()
|
||||
return ImGui::IsWindowCollapsed();
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetWindowFontScale(float scale)
|
||||
{
|
||||
ImGui::SetWindowFontScale(scale);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetNextWindowPos(CONST ImVec2 pos, ImGuiSetCond cond)
|
||||
{
|
||||
ImGui::SetNextWindowPos(pos, cond);
|
||||
@@ -325,6 +315,21 @@ CIMGUI_API void igPopStyleVar(int count)
|
||||
return ImGui::PopStyleVar(count);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* igGetFont()
|
||||
{
|
||||
return ImGui::GetFont();
|
||||
}
|
||||
|
||||
CIMGUI_API float igGetFontSize()
|
||||
{
|
||||
return ImGui::GetFontSize();
|
||||
}
|
||||
|
||||
CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2* pOut)
|
||||
{
|
||||
*pOut = ImGui::GetFontTexUvWhitePixel();
|
||||
}
|
||||
|
||||
CIMGUI_API ImU32 igGetColorU32(ImGuiCol idx, float alpha_mul)
|
||||
{
|
||||
return ImGui::GetColorU32(idx,alpha_mul);
|
||||
@@ -462,9 +467,9 @@ CIMGUI_API void igSeparator()
|
||||
return ImGui::Separator();
|
||||
}
|
||||
|
||||
CIMGUI_API void igSameLine(float local_pos_x, float spacing_w)
|
||||
CIMGUI_API void igSameLine(float pos_x, float spacing_w)
|
||||
{
|
||||
return ImGui::SameLine(local_pos_x, spacing_w);
|
||||
return ImGui::SameLine(pos_x, spacing_w);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSpacing()
|
||||
@@ -487,41 +492,6 @@ CIMGUI_API void igUnindent()
|
||||
return ImGui::Unindent();
|
||||
}
|
||||
|
||||
CIMGUI_API void igColumns(int count, CONST char* id, bool border)
|
||||
{
|
||||
return ImGui::Columns(count, id, border);
|
||||
}
|
||||
|
||||
CIMGUI_API void igNextColumn()
|
||||
{
|
||||
return ImGui::NextColumn();
|
||||
}
|
||||
|
||||
CIMGUI_API int igGetColumnIndex()
|
||||
{
|
||||
return ImGui::GetColumnIndex();
|
||||
}
|
||||
|
||||
CIMGUI_API float igGetColumnOffset(int column_index)
|
||||
{
|
||||
return ImGui::GetColumnOffset(column_index);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x)
|
||||
{
|
||||
return ImGui::SetColumnOffset(column_index, offset_x);
|
||||
}
|
||||
|
||||
CIMGUI_API float igGetColumnWidth(int column_index)
|
||||
{
|
||||
return ImGui::GetColumnWidth(column_index);
|
||||
}
|
||||
|
||||
CIMGUI_API int igGetColumnsCount()
|
||||
{
|
||||
return ImGui::GetColumnsCount();
|
||||
}
|
||||
|
||||
CIMGUI_API void igGetCursorPos(ImVec2* pOut)
|
||||
{
|
||||
*pOut = ImGui::GetCursorPos();
|
||||
@@ -587,6 +557,43 @@ CIMGUI_API float igGetItemsLineHeightWithSpacing()
|
||||
return ImGui::GetItemsLineHeightWithSpacing();
|
||||
}
|
||||
|
||||
//Columns
|
||||
|
||||
CIMGUI_API void igColumns(int count, CONST char* id, bool border)
|
||||
{
|
||||
return ImGui::Columns(count, id, border);
|
||||
}
|
||||
|
||||
CIMGUI_API void igNextColumn()
|
||||
{
|
||||
return ImGui::NextColumn();
|
||||
}
|
||||
|
||||
CIMGUI_API int igGetColumnIndex()
|
||||
{
|
||||
return ImGui::GetColumnIndex();
|
||||
}
|
||||
|
||||
CIMGUI_API float igGetColumnOffset(int column_index)
|
||||
{
|
||||
return ImGui::GetColumnOffset(column_index);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x)
|
||||
{
|
||||
return ImGui::SetColumnOffset(column_index, offset_x);
|
||||
}
|
||||
|
||||
CIMGUI_API float igGetColumnWidth(int column_index)
|
||||
{
|
||||
return ImGui::GetColumnWidth(column_index);
|
||||
}
|
||||
|
||||
CIMGUI_API int igGetColumnsCount()
|
||||
{
|
||||
return ImGui::GetColumnsCount();
|
||||
}
|
||||
|
||||
// ID scopes
|
||||
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
|
||||
// You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide')
|
||||
@@ -1235,6 +1242,11 @@ CIMGUI_API void igGetItemRectSize(ImVec2* pOut)
|
||||
*pOut = ImGui::GetItemRectSize();
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetItemAllowOverlap()
|
||||
{
|
||||
ImGui::SetItemAllowOverlap();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsWindowHovered()
|
||||
{
|
||||
return ImGui::IsWindowHovered();
|
||||
@@ -1310,9 +1322,9 @@ CIMGUI_API bool igIsMouseHoveringAnyWindow()
|
||||
return ImGui::IsMouseHoveringAnyWindow();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 pos_min, CONST ImVec2 pos_max, bool clip)
|
||||
CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 r_min, CONST ImVec2 r_max, bool clip)
|
||||
{
|
||||
return ImGui::IsMouseHoveringRect(pos_min,pos_max,clip);
|
||||
return ImGui::IsMouseHoveringRect(r_min,r_max,clip);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold)
|
||||
@@ -1354,14 +1366,14 @@ CIMGUI_API void igSetMouseCursor(ImGuiMouseCursor type)
|
||||
ImGui::SetMouseCursor(type);
|
||||
}
|
||||
|
||||
CIMGUI_API void igCaptureKeyboardFromApp()
|
||||
CIMGUI_API void igCaptureKeyboardFromApp(bool capture)
|
||||
{
|
||||
return ImGui::CaptureKeyboardFromApp();
|
||||
return ImGui::CaptureKeyboardFromApp(capture);
|
||||
}
|
||||
|
||||
CIMGUI_API void igCaptureMouseFromApp()
|
||||
CIMGUI_API void igCaptureMouseFromApp(bool capture)
|
||||
{
|
||||
return ImGui::CaptureMouseFromApp();
|
||||
return ImGui::CaptureMouseFromApp(capture);
|
||||
}
|
||||
|
||||
CIMGUI_API void* igMemAlloc(size_t sz)
|
||||
|
@@ -48,14 +48,12 @@ CIMGUI_API void igGetWindowContentRegionMin(struct ImVec2* out);
|
||||
CIMGUI_API void igGetWindowContentRegionMax(struct ImVec2* out);
|
||||
CIMGUI_API float igGetWindowContentRegionWidth();
|
||||
CIMGUI_API ImDrawList* igGetWindowDrawList();
|
||||
CIMGUI_API ImFont* igGetWindowFont();
|
||||
CIMGUI_API float igGetWindowFontSize();
|
||||
CIMGUI_API void igSetWindowFontScale(float scale);
|
||||
CIMGUI_API void igGetWindowPos(struct ImVec2* out);
|
||||
CIMGUI_API void igGetWindowSize(struct ImVec2* out);
|
||||
CIMGUI_API float igGetWindowWidth();
|
||||
CIMGUI_API float igGetWindowHeight();
|
||||
CIMGUI_API bool igIsWindowCollapsed();
|
||||
CIMGUI_API void igSetWindowFontScale(float scale);
|
||||
|
||||
CIMGUI_API void igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetNextWindowPosCenter(ImGuiSetCond cond);
|
||||
@@ -93,6 +91,9 @@ CIMGUI_API void igPopStyleColor(int count);
|
||||
CIMGUI_API void igPushStyleVar(ImGuiStyleVar idx, float val);
|
||||
CIMGUI_API void igPushStyleVarVec(ImGuiStyleVar idx, CONST struct ImVec2 val);
|
||||
CIMGUI_API void igPopStyleVar(int count);
|
||||
CIMGUI_API ImFont* igGetFont();
|
||||
CIMGUI_API float igGetFontSize();
|
||||
CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2* pOut);
|
||||
CIMGUI_API ImU32 igGetColorU32(ImGuiCol idx, float alpha_mul);
|
||||
CIMGUI_API ImU32 igGetColorU32Vec(CONST ImVec4* col);
|
||||
|
||||
@@ -112,18 +113,11 @@ CIMGUI_API void igPopButtonRepeat();
|
||||
CIMGUI_API void igBeginGroup();
|
||||
CIMGUI_API void igEndGroup();
|
||||
CIMGUI_API void igSeparator();
|
||||
CIMGUI_API void igSameLine(float local_pos_x, float spacing_w);
|
||||
CIMGUI_API void igSameLine(float pos_x, float spacing_w);
|
||||
CIMGUI_API void igSpacing();
|
||||
CIMGUI_API void igDummy(CONST ImVec2* size);
|
||||
CIMGUI_API void igIndent();
|
||||
CIMGUI_API void igUnindent();
|
||||
CIMGUI_API void igColumns(int count, CONST char* id, bool border);
|
||||
CIMGUI_API void igNextColumn();
|
||||
CIMGUI_API int igGetColumnIndex();
|
||||
CIMGUI_API float igGetColumnOffset(int column_index);
|
||||
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x);
|
||||
CIMGUI_API float igGetColumnWidth(int column_index);
|
||||
CIMGUI_API int igGetColumnsCount();
|
||||
CIMGUI_API void igGetCursorPos(struct ImVec2* pOut);
|
||||
CIMGUI_API float igGetCursorPosX();
|
||||
CIMGUI_API float igGetCursorPosY();
|
||||
@@ -138,6 +132,15 @@ CIMGUI_API float igGetTextLineHeight();
|
||||
CIMGUI_API float igGetTextLineHeightWithSpacing();
|
||||
CIMGUI_API float igGetItemsLineHeightWithSpacing();
|
||||
|
||||
//Columns
|
||||
CIMGUI_API void igColumns(int count, CONST char* id, bool border);
|
||||
CIMGUI_API void igNextColumn();
|
||||
CIMGUI_API int igGetColumnIndex();
|
||||
CIMGUI_API float igGetColumnOffset(int column_index);
|
||||
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x);
|
||||
CIMGUI_API float igGetColumnWidth(int column_index);
|
||||
CIMGUI_API int igGetColumnsCount();
|
||||
|
||||
// ID scopes
|
||||
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
|
||||
// You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide')
|
||||
@@ -299,6 +302,7 @@ CIMGUI_API bool igIsAnyItemActive();
|
||||
CIMGUI_API void igGetItemRectMin(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetItemRectMax(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetItemRectSize(struct ImVec2* pOut);
|
||||
CIMGUI_API void igSetItemAllowOverlap();
|
||||
CIMGUI_API bool igIsWindowHovered();
|
||||
CIMGUI_API bool igIsWindowFocused();
|
||||
CIMGUI_API bool igIsRootWindowFocused();
|
||||
@@ -330,7 +334,7 @@ CIMGUI_API bool igIsMouseDoubleClicked(int button);
|
||||
CIMGUI_API bool igIsMouseReleased(int button);
|
||||
CIMGUI_API bool igIsMouseHoveringWindow();
|
||||
CIMGUI_API bool igIsMouseHoveringAnyWindow();
|
||||
CIMGUI_API bool igIsMouseHoveringRect(CONST struct ImVec2 pos_min, CONST struct ImVec2 pos_max, bool clip);
|
||||
CIMGUI_API bool igIsMouseHoveringRect(CONST struct ImVec2 r_min, CONST struct ImVec2 r_max, bool clip);
|
||||
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold);
|
||||
CIMGUI_API void igGetMousePos(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetMousePosOnOpeningCurrentPopup(ImVec2* pOut);
|
||||
@@ -338,8 +342,8 @@ CIMGUI_API void igGetMouseDragDelta(struct ImVec2* pOut, int button,
|
||||
CIMGUI_API void igResetMouseDragDelta(int button);
|
||||
CIMGUI_API ImGuiMouseCursor igGetMouseCursor();
|
||||
CIMGUI_API void igSetMouseCursor(ImGuiMouseCursor type);
|
||||
CIMGUI_API void igCaptureKeyboardFromApp();
|
||||
CIMGUI_API void igCaptureMouseFromApp();
|
||||
CIMGUI_API void igCaptureKeyboardFromApp(bool capture);
|
||||
CIMGUI_API void igCaptureMouseFromApp(bool capture);
|
||||
|
||||
// Helpers functions to access functions pointers in ImGui::GetIO()
|
||||
CIMGUI_API void* igMemAlloc(size_t sz);
|
||||
@@ -390,11 +394,12 @@ CIMGUI_API void ImDrawList_PopTextureID(ImDrawList* list);
|
||||
|
||||
// Primitives
|
||||
CIMGUI_API void ImDrawList_AddLine(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness);
|
||||
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners);
|
||||
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners, float thickness);
|
||||
CIMGUI_API void ImDrawList_AddRectFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners);
|
||||
CIMGUI_API void ImDrawList_AddRectFilledMultiColor(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);
|
||||
CIMGUI_API void ImDrawList_AddTriangle(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col, float thickness);
|
||||
CIMGUI_API void ImDrawList_AddTriangleFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col);
|
||||
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments);
|
||||
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments, float thickness);
|
||||
CIMGUI_API void ImDrawList_AddCircleFilled(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments);
|
||||
CIMGUI_API void ImDrawList_AddText(ImDrawList* list, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end);
|
||||
CIMGUI_API void ImDrawList_AddTextExt(ImDrawList* list, CONST ImFont* font, float font_size, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end, float wrap_width, CONST ImVec4* cpu_fine_clip_rect);
|
||||
@@ -427,6 +432,7 @@ CIMGUI_API void ImDrawList_AddDrawCmd(ImDrawList* list); // This is
|
||||
CIMGUI_API void ImDrawList_PrimReserve(ImDrawList* list, int idx_count, int vtx_count);
|
||||
CIMGUI_API void ImDrawList_PrimRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col);
|
||||
CIMGUI_API void ImDrawList_PrimRectUV(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, ImU32 col);
|
||||
CIMGUI_API void ImDrawList_PrimQuadUV(ImDrawList* list,CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, CONST struct ImVec2 uv_c, CONST struct ImVec2 uv_d, ImU32 col);
|
||||
CIMGUI_API void ImDrawList_PrimVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
|
||||
CIMGUI_API void ImDrawList_PrimWriteVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
|
||||
CIMGUI_API void ImDrawList_PrimWriteIdx(ImDrawList* list, ImDrawIdx idx);
|
||||
|
@@ -77,9 +77,9 @@ CIMGUI_API void ImDrawList_AddLine(ImDrawList* list, CONST struct ImVec2 a, CONS
|
||||
return list->AddLine(a, b, col, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners)
|
||||
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners, float thickness)
|
||||
{
|
||||
return list->AddRect(a, b, col, rounding, rounding_corners);
|
||||
return list->AddRect(a, b, col, rounding, rounding_corners, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddRectFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners)
|
||||
@@ -92,14 +92,19 @@ CIMGUI_API void ImDrawList_AddRectFilledMultiColor(ImDrawList* list, CONST struc
|
||||
return list->AddRectFilledMultiColor(a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddTriangle(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col, float thickness)
|
||||
{
|
||||
return list->AddTriangle(a,b,c,col,thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddTriangleFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col)
|
||||
{
|
||||
return list->AddTriangleFilled(a, b, c, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments)
|
||||
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments, float thickness)
|
||||
{
|
||||
return list->AddCircle(centre, radius, col, num_segments);
|
||||
return list->AddCircle(centre, radius, col, num_segments, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddCircleFilled(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments)
|
||||
@@ -222,6 +227,11 @@ CIMGUI_API void ImDrawList_PrimRectUV(ImDrawList* list, CONST struct ImVec2 a, C
|
||||
return list->PrimRectUV(a, b, uv_a, uv_b, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PrimQuadUV(ImDrawList* list,CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, CONST struct ImVec2 uv_c, CONST struct ImVec2 uv_d, ImU32 col)
|
||||
{
|
||||
return list->PrimQuadUV(a,b,c,d,uv_a,uv_b,uv_c,uv_d,col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PrimVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col)
|
||||
{
|
||||
return list->PrimVtx(pos, uv, col);
|
||||
|
2
imgui
2
imgui
Submodule imgui updated: 24d186753e...95cbcdca3f
Reference in New Issue
Block a user