mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-13 21:28:30 +01:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2f921e8479 | ||
![]() |
4c85fa45d0 | ||
![]() |
529ce02d6b | ||
![]() |
d564a6ed92 | ||
![]() |
b06fd153d8 | ||
![]() |
e4eac35476 |
@@ -1,12 +1,15 @@
|
||||
# cimgui [](https://travis-ci.org/Extrawurst/cimgui)
|
||||
|
||||

|
||||

|
||||
|
||||
This is a thin c-api wrapper for the excellent C++ intermediate gui [imgui](https://github.com/ocornut/imgui).
|
||||
Most of the functions have wrapper counterparts now, missing stuff is added on a as-needed basis (PR welcome).
|
||||
This library is intended as a intermediate layer to be able to use imgui from other languages that can interface with C (like D - see [D-binding](https://github.com/Extrawurst/DerelictImgui))
|
||||
|
||||
Note: currently this wrapper is based on a WIP version of imgui 1.38
|
||||
Notes:
|
||||
* currently this wrapper is based on version [1.40 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.40)
|
||||
* does not compile with pure C compiler yet (for writing bindings in languages that are able to use C-ABI it is enough though, see D-bindings)
|
||||
|
||||
# usage
|
||||
|
||||
|
@@ -129,9 +129,9 @@ CIMGUI_API float ig_GetWindowWidth()
|
||||
return ImGui::GetWindowWidth();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_GetWindowCollapsed()
|
||||
CIMGUI_API bool ig_IsWindowCollapsed()
|
||||
{
|
||||
return ImGui::GetWindowCollapsed();
|
||||
return ImGui::IsWindowCollapsed();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_SetNextWindowPos(CONST ImVec2 pos, ImGuiSetCond cond)
|
||||
@@ -296,6 +296,16 @@ CIMGUI_API void ig_PopTextWrapPos()
|
||||
return ImGui::PopTextWrapPos();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_PushButtonRepeat(bool repeat)
|
||||
{
|
||||
return ImGui::PushButtonRepeat(repeat);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_PopButtonRepeat()
|
||||
{
|
||||
return ImGui::PopButtonRepeat();
|
||||
}
|
||||
|
||||
// Tooltip
|
||||
CIMGUI_API void ig_SetTooltip(CONST char* fmt, ...)
|
||||
{
|
||||
@@ -321,9 +331,29 @@ CIMGUI_API void ig_EndTooltip()
|
||||
}
|
||||
|
||||
// Popup
|
||||
CIMGUI_API void ig_BeginPopup(bool* p_opened)
|
||||
CIMGUI_API void ig_OpenPopup(const char* str_id)
|
||||
{
|
||||
return ImGui::BeginPopup(p_opened);
|
||||
return ImGui::OpenPopup(str_id);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginPopup(const char* str_id)
|
||||
{
|
||||
return ImGui::BeginPopup(str_id);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginPopupContextItem(CONST char* str_id, int mouse_button)
|
||||
{
|
||||
return ImGui::BeginPopupContextItem(str_id, mouse_button);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginPopupContextWindow(bool also_over_items, CONST char* str_id, int mouse_button)
|
||||
{
|
||||
return ImGui::BeginPopupContextWindow(also_over_items, str_id, mouse_button);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginPopupContextVoid(CONST char* str_id, int mouse_button)
|
||||
{
|
||||
return ImGui::BeginPopupContextVoid(str_id, mouse_button);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_EndPopup()
|
||||
@@ -331,6 +361,11 @@ CIMGUI_API void ig_EndPopup()
|
||||
return ImGui::EndPopup();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_CloseCurrentPopup()
|
||||
{
|
||||
return ImGui::CloseCurrentPopup();
|
||||
}
|
||||
|
||||
// Layout
|
||||
CIMGUI_API void ig_BeginGroup()
|
||||
{
|
||||
@@ -357,6 +392,11 @@ CIMGUI_API void ig_Spacing()
|
||||
return ImGui::Spacing();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_Dummy(CONST ImVec2* size)
|
||||
{
|
||||
return ImGui::Dummy(*size);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_Indent()
|
||||
{
|
||||
return ImGui::Indent();
|
||||
@@ -457,6 +497,11 @@ CIMGUI_API float ig_GetTextLineHeightWithSpacing()
|
||||
return ImGui::GetTextLineHeightWithSpacing();
|
||||
}
|
||||
|
||||
CIMGUI_API float ig_GetItemsLineHeightWithSpacing()
|
||||
{
|
||||
return ImGui::GetItemsLineHeightWithSpacing();
|
||||
}
|
||||
|
||||
// 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')
|
||||
@@ -528,6 +573,19 @@ CIMGUI_API void ig_TextColoredV(CONST ImVec4 col, CONST char* fmt, va_list ar
|
||||
ImGui::TextColoredV(col,fmt,args);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_TextDisabled(CONST char* fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
ImGui::TextDisabledV(fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_TextDisabledV(CONST char* fmt, va_list args)
|
||||
{
|
||||
return ImGui::TextDisabledV(fmt,args);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_TextWrapped(CONST char* fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
@@ -577,9 +635,9 @@ CIMGUI_API void ig_BulletTextV(CONST char* fmt, va_list args)
|
||||
ImGui::BulletTextV(fmt, args);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_Button(CONST char* label, CONST ImVec2 size, bool repeat_when_held)
|
||||
CIMGUI_API bool ig_Button(CONST char* label, CONST ImVec2 size)
|
||||
{
|
||||
return ImGui::Button(label, size, repeat_when_held);
|
||||
return ImGui::Button(label, size);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_SmallButton(CONST char* label)
|
||||
@@ -790,19 +848,19 @@ CIMGUI_API bool ig_InputFloat(CONST char* label, float* v, float step, float
|
||||
return ImGui::InputFloat(label, v, step, step_fast, decimal_precision, extra_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputFloat2(CONST char* label, float v[2], int decimal_precision)
|
||||
CIMGUI_API bool ig_InputFloat2(CONST char* label, float v[2], int decimal_precision, ImGuiInputTextFlags extra_flags)
|
||||
{
|
||||
return ImGui::InputFloat2(label, v, decimal_precision);
|
||||
return ImGui::InputFloat2(label, v, decimal_precision, extra_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputFloat3(CONST char* label, float v[3], int decimal_precision)
|
||||
CIMGUI_API bool ig_InputFloat3(CONST char* label, float v[3], int decimal_precision, ImGuiInputTextFlags extra_flags)
|
||||
{
|
||||
return ImGui::InputFloat3(label, v, decimal_precision);
|
||||
return ImGui::InputFloat3(label, v, decimal_precision, extra_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputFloat4(CONST char* label, float v[4], int decimal_precision)
|
||||
CIMGUI_API bool ig_InputFloat4(CONST char* label, float v[4], int decimal_precision, ImGuiInputTextFlags extra_flags)
|
||||
{
|
||||
return ImGui::InputFloat4(label, v, decimal_precision);
|
||||
return ImGui::InputFloat4(label, v, decimal_precision, extra_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputInt(CONST char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags)
|
||||
@@ -810,19 +868,19 @@ CIMGUI_API bool ig_InputInt(CONST char* label, int* v, int step, int step_fas
|
||||
return ImGui::InputInt(label, v, step, step_fast, extra_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputInt2(CONST char* label, int v[2])
|
||||
CIMGUI_API bool ig_InputInt2(CONST char* label, int v[2], ImGuiInputTextFlags extra_flags)
|
||||
{
|
||||
return ImGui::InputInt2(label, v);
|
||||
return ImGui::InputInt2(label, v, extra_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputInt3(CONST char* label, int v[3])
|
||||
CIMGUI_API bool ig_InputInt3(CONST char* label, int v[3], ImGuiInputTextFlags extra_flags)
|
||||
{
|
||||
return ImGui::InputInt3(label, v);
|
||||
return ImGui::InputInt3(label, v, extra_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputInt4(CONST char* label, int v[4])
|
||||
CIMGUI_API bool ig_InputInt4(CONST char* label, int v[4], ImGuiInputTextFlags extra_flags)
|
||||
{
|
||||
return ImGui::InputInt4(label, v);
|
||||
return ImGui::InputInt4(label, v, extra_flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -915,7 +973,47 @@ CIMGUI_API bool ig_ListBoxHeader2(CONST char* label, int items_count, int hei
|
||||
|
||||
CIMGUI_API void ig_ListBoxFooter()
|
||||
{
|
||||
ImGui::ListBoxFooter();
|
||||
return ImGui::ListBoxFooter();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginMainMenuBar()
|
||||
{
|
||||
return ImGui::BeginMainMenuBar();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_EndMainMenuBar()
|
||||
{
|
||||
return ImGui::EndMainMenuBar();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginMenuBar()
|
||||
{
|
||||
return ImGui::BeginMenuBar();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_EndMenuBar()
|
||||
{
|
||||
return ImGui::EndMenuBar();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginMenu(CONST char* label, bool enabled)
|
||||
{
|
||||
return ImGui::BeginMenu(label, enabled);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_EndMenu()
|
||||
{
|
||||
return ImGui::EndMenu();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_MenuItem(CONST char* label, CONST char* shortcut, bool selected, bool enabled)
|
||||
{
|
||||
return ImGui::MenuItem(label, shortcut, selected, enabled);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_MenuItemPtr(CONST char* label, CONST char* shortcut, bool* p_selected, bool enabled)
|
||||
{
|
||||
return ImGui::MenuItem(label, shortcut, p_selected, enabled);
|
||||
}
|
||||
|
||||
// Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare your own within the ImGui namespace!)
|
||||
@@ -1002,16 +1100,21 @@ CIMGUI_API bool ig_IsItemActive()
|
||||
return ImGui::IsItemActive();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsAnyItemActive()
|
||||
{
|
||||
return ImGui::IsAnyItemActive();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsItemVisible()
|
||||
{
|
||||
return ImGui::IsItemVisible();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsAnyItemHovered()
|
||||
{
|
||||
return ImGui::IsAnyItemHovered();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsAnyItemActive()
|
||||
{
|
||||
return ImGui::IsAnyItemActive();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_GetItemRectMin(ImVec2* pOut)
|
||||
{
|
||||
*pOut = ImGui::GetItemRectMin();
|
||||
@@ -1042,9 +1145,14 @@ CIMGUI_API bool ig_IsRootWindowOrAnyChildFocused()
|
||||
return ImGui::IsRootWindowOrAnyChildFocused();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsRectClipped(CONST ImVec2 item_size)
|
||||
CIMGUI_API bool ig_IsRectVisible(CONST ImVec2 item_size)
|
||||
{
|
||||
return ImGui::IsRectClipped(item_size);
|
||||
return ImGui::IsRectVisible(item_size);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsKeyDown(int key_index)
|
||||
{
|
||||
return ImGui::IsKeyDown(key_index);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat)
|
||||
@@ -1052,6 +1160,11 @@ CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat)
|
||||
return ImGui::IsKeyPressed(key_index,repeat);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsMouseDown(int button)
|
||||
{
|
||||
return ImGui::IsMouseDown(button);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsMouseClicked(int button, bool repeat)
|
||||
{
|
||||
return ImGui::IsMouseClicked(button, repeat);
|
||||
|
@@ -50,7 +50,7 @@ CIMGUI_API void ig_SetWindowFontScale(float scale);
|
||||
CIMGUI_API void ig_GetWindowPos(struct ImVec2* out);
|
||||
CIMGUI_API void ig_GetWindowSize(struct ImVec2* out);
|
||||
CIMGUI_API float ig_GetWindowWidth();
|
||||
CIMGUI_API bool ig_GetWindowCollapsed();
|
||||
CIMGUI_API bool ig_IsWindowCollapsed();
|
||||
|
||||
CIMGUI_API void ig_SetNextWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
@@ -89,6 +89,9 @@ CIMGUI_API void ig_PushAllowKeyboardFocus(bool v);
|
||||
CIMGUI_API void ig_PopAllowKeyboardFocus();
|
||||
CIMGUI_API void ig_PushTextWrapPos(float wrap_pos_x);
|
||||
CIMGUI_API void ig_PopTextWrapPos();
|
||||
CIMGUI_API void ig_PushButtonRepeat(bool repeat);
|
||||
CIMGUI_API void ig_PopButtonRepeat();
|
||||
|
||||
|
||||
// Tooltip
|
||||
CIMGUI_API void ig_SetTooltip(CONST char* fmt, ...);
|
||||
@@ -97,8 +100,13 @@ CIMGUI_API void ig_BeginTooltip();
|
||||
CIMGUI_API void ig_EndTooltip();
|
||||
|
||||
// Popup
|
||||
CIMGUI_API void ig_BeginPopup(bool* p_opened);
|
||||
CIMGUI_API void ig_OpenPopup(CONST char* str_id);
|
||||
CIMGUI_API bool ig_BeginPopup(CONST char* str_id);
|
||||
CIMGUI_API bool ig_BeginPopupContextItem(CONST char* str_id, int mouse_button = 1);
|
||||
CIMGUI_API bool ig_BeginPopupContextWindow(bool also_over_items = true, CONST char* str_id = NULL, int mouse_button = 1);
|
||||
CIMGUI_API bool ig_BeginPopupContextVoid(CONST char* str_id = NULL, int mouse_button = 1);
|
||||
CIMGUI_API void ig_EndPopup();
|
||||
CIMGUI_API void ig_CloseCurrentPopup();
|
||||
|
||||
// Layout
|
||||
CIMGUI_API void ig_BeginGroup();
|
||||
@@ -106,6 +114,7 @@ CIMGUI_API void ig_EndGroup();
|
||||
CIMGUI_API void ig_Separator();
|
||||
CIMGUI_API void ig_SameLine(int column_x, int spacing_w);
|
||||
CIMGUI_API void ig_Spacing();
|
||||
CIMGUI_API void ig_Dummy(CONST ImVec2* size);
|
||||
CIMGUI_API void ig_Indent();
|
||||
CIMGUI_API void ig_Unindent();
|
||||
CIMGUI_API void ig_Columns(int count, CONST char* id, bool border);
|
||||
@@ -126,6 +135,7 @@ CIMGUI_API void ig_SetCursorScreenPos(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void ig_AlignFirstTextHeightToWidgets();
|
||||
CIMGUI_API float ig_GetTextLineHeight();
|
||||
CIMGUI_API float ig_GetTextLineHeightWithSpacing();
|
||||
CIMGUI_API float ig_GetItemsLineHeightWithSpacing();
|
||||
|
||||
// ID scopes
|
||||
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
|
||||
@@ -144,6 +154,8 @@ CIMGUI_API void ig_Text(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_TextV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TextColored(CONST struct ImVec4 col, CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_TextColoredV(CONST struct ImVec4 col, CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TextDisabled(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_TextDisabledV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TextWrapped(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_TextWrappedV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TextUnformatted(CONST char* text, CONST char* text_end);
|
||||
@@ -152,7 +164,7 @@ CIMGUI_API void ig_LabelTextV(CONST char* label, CONST char* fmt, va
|
||||
CIMGUI_API void ig_Bullet();
|
||||
CIMGUI_API void ig_BulletText(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_BulletTextV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API bool ig_Button(CONST char* label, CONST struct ImVec2 size, bool repeat_when_held);
|
||||
CIMGUI_API bool ig_Button(CONST char* label, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool ig_SmallButton(CONST char* label);
|
||||
CIMGUI_API bool ig_InvisibleButton(CONST char* str_id, CONST struct ImVec2 size);
|
||||
CIMGUI_API void ig_Image(ImTextureID user_texture_id, CONST struct ImVec2 size, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, CONST struct ImVec4 tint_col, CONST struct ImVec4 border_col);
|
||||
@@ -201,13 +213,13 @@ CIMGUI_API bool ig_DragInt4(CONST char* label, int v[4], float v_spe
|
||||
// Widgets: Input
|
||||
CIMGUI_API bool ig_InputText(CONST char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
|
||||
CIMGUI_API bool ig_InputFloat(CONST char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputFloat2(CONST char* label, float v[2], int decimal_precision);
|
||||
CIMGUI_API bool ig_InputFloat3(CONST char* label, float v[3], int decimal_precision);
|
||||
CIMGUI_API bool ig_InputFloat4(CONST char* label, float v[4], int decimal_precision);
|
||||
CIMGUI_API bool ig_InputFloat2(CONST char* label, float v[2], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputFloat3(CONST char* label, float v[3], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputFloat4(CONST char* label, float v[4], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputInt(CONST char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputInt2(CONST char* label, int v[2]);
|
||||
CIMGUI_API bool ig_InputInt3(CONST char* label, int v[3]);
|
||||
CIMGUI_API bool ig_InputInt4(CONST char* label, int v[4]);
|
||||
CIMGUI_API bool ig_InputInt2(CONST char* label, int v[2], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputInt3(CONST char* label, int v[3], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputInt4(CONST char* label, int v[4], ImGuiInputTextFlags extra_flags);
|
||||
|
||||
// Widgets: Trees
|
||||
CIMGUI_API bool ig_TreeNode(CONST char* str_label_id);
|
||||
@@ -229,6 +241,17 @@ CIMGUI_API bool ig_ListBoxHeader(CONST char* label, CONST struct ImV
|
||||
CIMGUI_API bool ig_ListBoxHeader2(CONST char* label, int items_count, int height_in_items);
|
||||
CIMGUI_API void ig_ListBoxFooter();
|
||||
|
||||
// Widgets: Menus
|
||||
CIMGUI_API bool ig_BeginMainMenuBar();
|
||||
CIMGUI_API void ig_EndMainMenuBar();
|
||||
CIMGUI_API bool ig_BeginMenuBar();
|
||||
CIMGUI_API void ig_EndMenuBar();
|
||||
CIMGUI_API bool ig_BeginMenu(CONST char* label, bool enabled);
|
||||
CIMGUI_API void ig_EndMenu();
|
||||
CIMGUI_API bool ig_MenuItem(CONST char* label, CONST char* shortcut, bool selected, bool enabled);
|
||||
CIMGUI_API bool ig_MenuItemPtr(CONST char* label, CONST char* shortcut, bool* p_selected, bool enabled);
|
||||
|
||||
|
||||
// Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare your own within the ImGui namespace!)
|
||||
CIMGUI_API void ig_ValueBool(CONST char* prefix, bool b);
|
||||
CIMGUI_API void ig_ValueInt(CONST char* prefix, int v);
|
||||
@@ -249,16 +272,19 @@ CIMGUI_API void ig_LogText(CONST char* fmt, ...);
|
||||
CIMGUI_API bool ig_IsItemHovered();
|
||||
CIMGUI_API bool ig_IsItemHoveredRect();
|
||||
CIMGUI_API bool ig_IsItemActive();
|
||||
CIMGUI_API bool ig_IsAnyItemActive();
|
||||
CIMGUI_API bool ig_IsItemVisible();
|
||||
CIMGUI_API bool ig_IsAnyItemHovered();
|
||||
CIMGUI_API bool ig_IsAnyItemActive();
|
||||
CIMGUI_API void ig_GetItemRectMin(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetItemRectMax(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetItemRectSize(struct ImVec2* pOut);
|
||||
CIMGUI_API bool ig_IsWindowFocused();
|
||||
CIMGUI_API bool ig_IsRootWindowFocused();
|
||||
CIMGUI_API bool ig_IsRootWindowOrAnyChildFocused();
|
||||
CIMGUI_API bool ig_IsRectClipped(CONST struct ImVec2 item_size);
|
||||
CIMGUI_API bool ig_IsRectVisible(CONST struct ImVec2 item_size);
|
||||
CIMGUI_API bool ig_IsKeyDown(int key_index);
|
||||
CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat);
|
||||
CIMGUI_API bool ig_IsMouseDown(int button);
|
||||
CIMGUI_API bool ig_IsMouseClicked(int button, bool repeat);
|
||||
CIMGUI_API bool ig_IsMouseDoubleClicked(int button);
|
||||
CIMGUI_API bool ig_IsMouseHoveringWindow();
|
||||
@@ -296,7 +322,7 @@ CIMGUI_API void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* atlas, u
|
||||
CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* atlas, void* tex);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas, CONST char* filename, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* in_ttf_data, unsigned int in_ttf_data_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* in_compressed_ttf_data, unsigned int in_compressed_ttf_data_size, float size_pixels, CONST ImWchar* glyph_ranges = NULL, int font_no = 0);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
|
||||
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas);
|
||||
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* atlas);
|
@@ -22,19 +22,19 @@ CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas)
|
||||
return atlas->AddFontDefault();
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas,const char* filename, float size_pixels, const ImWchar* glyph_ranges, int font_no)
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas,CONST char* filename, float size_pixels, CONST ImWchar* glyph_ranges, int font_no)
|
||||
{
|
||||
return atlas->AddFontFromFileTTF(filename, size_pixels, glyph_ranges, font_no);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* in_ttf_data, unsigned int in_ttf_data_size, float size_pixels, const ImWchar* glyph_ranges, int font_no)
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no)
|
||||
{
|
||||
return atlas->AddFontFromMemoryTTF(in_ttf_data, in_ttf_data_size, size_pixels, glyph_ranges, font_no);
|
||||
return atlas->AddFontFromMemoryTTF(ttf_data, ttf_size, size_pixels, glyph_ranges, font_no);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, const void* in_compressed_ttf_data, unsigned int in_compressed_ttf_data_size, float size_pixels, const ImWchar* glyph_ranges, int font_no)
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no)
|
||||
{
|
||||
return atlas->AddFontFromMemoryCompressedTTF(in_compressed_ttf_data, in_compressed_ttf_data_size, size_pixels, glyph_ranges, font_no);
|
||||
return atlas->AddFontFromMemoryCompressedTTF(compressed_ttf_data, compressed_ttf_size, size_pixels, glyph_ranges, font_no);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas)
|
||||
|
2
imgui
2
imgui
Submodule imgui updated: 0123fc8c0f...931b8dcdaf
BIN
menus-api.gif
Normal file
BIN
menus-api.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 195 KiB |
Reference in New Issue
Block a user