28 #include "scriptarray/scriptarray.h"
31 #include <angelscript.h>
35 using namespace AngelScript;
41 CScriptArray* array_obj =
static_cast<CScriptArray*
>(data);
42 void* value_raw = array_obj->At(index);
43 if (value_raw ==
nullptr)
49 return *
static_cast<float*
>(value_raw);
58 engine->RegisterEnum(
"ImGuiStyleVar");
59 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_Alpha", ImGuiStyleVar_Alpha);
60 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_WindowPadding", ImGuiStyleVar_WindowPadding);
61 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_WindowRounding", ImGuiStyleVar_WindowRounding);
62 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_WindowBorderSize", ImGuiStyleVar_WindowBorderSize);
63 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_WindowMinSize", ImGuiStyleVar_WindowMinSize);
64 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_WindowTitleAlign", ImGuiStyleVar_WindowTitleAlign);
65 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_ChildRounding", ImGuiStyleVar_ChildRounding);
66 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_ChildBorderSize", ImGuiStyleVar_ChildBorderSize);
67 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_PopupRounding", ImGuiStyleVar_PopupRounding);
68 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_PopupBorderSize", ImGuiStyleVar_PopupBorderSize);
69 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_FramePadding", ImGuiStyleVar_FramePadding);
70 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_FrameRounding", ImGuiStyleVar_FrameRounding);
71 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_FrameBorderSize", ImGuiStyleVar_FrameBorderSize);
72 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_ItemSpacing", ImGuiStyleVar_ItemSpacing);
73 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_ItemInnerSpacing", ImGuiStyleVar_ItemInnerSpacing);
74 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_IndentSpacing", ImGuiStyleVar_IndentSpacing);
75 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_ScrollbarSize", ImGuiStyleVar_ScrollbarSize);
76 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_ScrollbarRounding", ImGuiStyleVar_ScrollbarRounding);
77 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_GrabMinSize", ImGuiStyleVar_GrabMinSize);
78 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_GrabRounding", ImGuiStyleVar_GrabRounding);
79 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_TabRounding", ImGuiStyleVar_TabRounding);
80 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_ButtonTextAlign", ImGuiStyleVar_ButtonTextAlign);
81 engine->RegisterEnumValue(
"ImGuiStyleVar",
"ImGuiStyleVar_SelectableTextAlign", ImGuiStyleVar_SelectableTextAlign);
83 engine->RegisterEnum(
"ImGuiWindowFlags");
84 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_None", ImGuiWindowFlags_None);
85 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoTitleBar", ImGuiWindowFlags_NoTitleBar);
86 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoResize", ImGuiWindowFlags_NoResize);
87 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoMove", ImGuiWindowFlags_NoMove);
88 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoScrollbar", ImGuiWindowFlags_NoScrollbar);
89 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoScrollWithMouse", ImGuiWindowFlags_NoScrollWithMouse);
90 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoCollapse", ImGuiWindowFlags_NoCollapse);
91 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_AlwaysAutoResize", ImGuiWindowFlags_AlwaysAutoResize);
92 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoBackground", ImGuiWindowFlags_NoBackground);
93 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoSavedSettings", ImGuiWindowFlags_NoSavedSettings);
94 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoMouseInputs", ImGuiWindowFlags_NoMouseInputs);
95 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_MenuBar", ImGuiWindowFlags_MenuBar);
96 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_HorizontalScrollbar", ImGuiWindowFlags_HorizontalScrollbar);
97 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoFocusOnAppearing", ImGuiWindowFlags_NoFocusOnAppearing);
98 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoBringToFrontOnFocus", ImGuiWindowFlags_NoBringToFrontOnFocus);
99 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_AlwaysVerticalScrollbar", ImGuiWindowFlags_AlwaysVerticalScrollbar);
100 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_AlwaysHorizontalScrollbar", ImGuiWindowFlags_AlwaysHorizontalScrollbar);
101 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_AlwaysUseWindowPadding", ImGuiWindowFlags_AlwaysUseWindowPadding);
102 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoNavInputs", ImGuiWindowFlags_NoNavInputs);
103 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoNavFocus", ImGuiWindowFlags_NoNavFocus);
104 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_UnsavedDocument", ImGuiWindowFlags_UnsavedDocument);
105 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoNav", ImGuiWindowFlags_NoNav);
106 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoDecoration", ImGuiWindowFlags_NoDecoration);
107 engine->RegisterEnumValue(
"ImGuiWindowFlags",
"ImGuiWindowFlags_NoInputs", ImGuiWindowFlags_NoInputs);
110 engine->RegisterEnum(
"ImGuiCol");
111 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_Text" , ImGuiCol_Text);
112 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TextDisabled" , ImGuiCol_TextDisabled);
113 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_WindowBg" , ImGuiCol_WindowBg);
114 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ChildBg" , ImGuiCol_ChildBg);
115 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_PopupBg" , ImGuiCol_PopupBg);
116 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_Border" , ImGuiCol_Border);
117 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_BorderShadow" , ImGuiCol_BorderShadow);
118 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_FrameBg" , ImGuiCol_FrameBg);
119 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_FrameBgHovered" , ImGuiCol_FrameBgHovered);
120 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_FrameBgActive" , ImGuiCol_FrameBgActive);
121 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TitleBg" , ImGuiCol_TitleBg);
122 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TitleBgActive" , ImGuiCol_TitleBgActive);
123 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TitleBgCollapsed" , ImGuiCol_TitleBgCollapsed);
124 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_MenuBarBg" , ImGuiCol_MenuBarBg);
125 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ScrollbarBg" , ImGuiCol_ScrollbarBg);
126 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ScrollbarGrab" , ImGuiCol_ScrollbarGrab);
127 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ScrollbarGrabHovered" , ImGuiCol_ScrollbarGrabHovered);
128 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ScrollbarGrabActive" , ImGuiCol_ScrollbarGrabActive);
129 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_CheckMark" , ImGuiCol_CheckMark);
130 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_SliderGrab" , ImGuiCol_SliderGrab);
131 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_SliderGrabActive" , ImGuiCol_SliderGrabActive);
132 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_Button" , ImGuiCol_Button);
133 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ButtonHovered" , ImGuiCol_ButtonHovered);
134 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ButtonActive" , ImGuiCol_ButtonActive);
135 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_Header" , ImGuiCol_Header);
136 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_HeaderHovered" , ImGuiCol_HeaderHovered);
137 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_HeaderActive" , ImGuiCol_HeaderActive);
138 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_Separator" , ImGuiCol_Separator);
139 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_SeparatorHovered" , ImGuiCol_SeparatorHovered);
140 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_SeparatorActive" , ImGuiCol_SeparatorActive);
141 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ResizeGrip" , ImGuiCol_ResizeGrip);
142 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ResizeGripHovered" , ImGuiCol_ResizeGripHovered);
143 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ResizeGripActive" , ImGuiCol_ResizeGripActive);
144 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_Tab" , ImGuiCol_Tab);
145 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TabHovered" , ImGuiCol_TabHovered);
146 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TabActive" , ImGuiCol_TabActive);
147 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TabUnfocused" , ImGuiCol_TabUnfocused);
148 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TabUnfocusedActive" , ImGuiCol_TabUnfocusedActive);
149 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_PlotLines" , ImGuiCol_PlotLines);
150 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_PlotLinesHovered" , ImGuiCol_PlotLinesHovered);
151 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_PlotHistogram" , ImGuiCol_PlotHistogram);
152 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_PlotHistogramHovered" , ImGuiCol_PlotHistogramHovered);
153 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_TextSelectedBg" , ImGuiCol_TextSelectedBg);
154 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_DragDropTarget" , ImGuiCol_DragDropTarget);
155 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_NavHighlight" , ImGuiCol_NavHighlight);
156 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_NavWindowingHighlight" , ImGuiCol_NavWindowingHighlight);
157 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_NavWindowingDimBg" , ImGuiCol_NavWindowingDimBg);
158 engine->RegisterEnumValue(
"ImGuiCol",
"ImGuiCol_ModalWindowDimBg" , ImGuiCol_ModalWindowDimBg);
160 engine->RegisterEnum(
"ImGuiCond");
161 engine->RegisterEnumValue(
"ImGuiCond",
"ImGuiCond_Always", ImGuiCond_Always);
162 engine->RegisterEnumValue(
"ImGuiCond",
"ImGuiCond_Once", ImGuiCond_Once);
163 engine->RegisterEnumValue(
"ImGuiCond",
"ImGuiCond_FirstUseEver", ImGuiCond_FirstUseEver);
164 engine->RegisterEnumValue(
"ImGuiCond",
"ImGuiCond_Appearing", ImGuiCond_Appearing);
166 engine->RegisterEnum(
"ImGuiTabBarFlags");
167 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_None", ImGuiTabBarFlags_None);
168 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_Reorderable", ImGuiTabBarFlags_Reorderable);
169 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_AutoSelectNewTabs", ImGuiTabBarFlags_AutoSelectNewTabs);
170 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_TabListPopupButton", ImGuiTabBarFlags_TabListPopupButton);
171 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_NoCloseWithMiddleMouseButton", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton);
172 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_NoTabListScrollingButtons", ImGuiTabBarFlags_NoTabListScrollingButtons);
173 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_NoTooltip", ImGuiTabBarFlags_NoTooltip);
174 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_FittingPolicyResizeDown", ImGuiTabBarFlags_FittingPolicyResizeDown);
175 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_FittingPolicyScroll", ImGuiTabBarFlags_FittingPolicyScroll);
176 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_FittingPolicyMask_", ImGuiTabBarFlags_FittingPolicyMask_);
177 engine->RegisterEnumValue(
"ImGuiTabBarFlags",
"ImGuiTabBarFlags_FittingPolicyDefault_", ImGuiTabBarFlags_FittingPolicyDefault_);
179 engine->RegisterEnum(
"ImGuiTabItemFlags");
180 engine->RegisterEnumValue(
"ImGuiTabItemFlags",
"ImGuiTabItemFlags_None", ImGuiTabItemFlags_None);
181 engine->RegisterEnumValue(
"ImGuiTabItemFlags",
"ImGuiTabItemFlags_UnsavedDocument", ImGuiTabItemFlags_UnsavedDocument);
182 engine->RegisterEnumValue(
"ImGuiTabItemFlags",
"ImGuiTabItemFlags_SetSelected", ImGuiTabItemFlags_SetSelected);
183 engine->RegisterEnumValue(
"ImGuiTabItemFlags",
"ImGuiTabItemFlags_NoCloseWithMiddleMouseButton", ImGuiTabItemFlags_NoCloseWithMiddleMouseButton);
184 engine->RegisterEnumValue(
"ImGuiTabItemFlags",
"ImGuiTabItemFlags_NoPushId", ImGuiTabItemFlags_NoPushId);
188 engine->RegisterObjectType(
"ImDrawList",
sizeof(ImDrawList), asOBJ_REF | asOBJ_NOCOUNT);
189 engine->RegisterObjectMethod(
"ImDrawList",
"void AddLine(const vector2&in p1, const vector2&in p2, const color&in col, float thickness = 1.f)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::Vector2
const& p1, Ogre::Vector2
const& p2, Ogre::ColourValue
const& col,
float thickness) { drawlist->AddLine(ImVec2(p1.x, p1.y), ImVec2(p2.x, p2.y), ImColor(col.r, col.g, col.b, col.a), thickness); }, (ImDrawList * , Ogre::Vector2
const& , Ogre::Vector2
const& , Ogre::ColourValue
const& , float ),
void), asCALL_CDECL_OBJFIRST);
190 engine->RegisterObjectMethod(
"ImDrawList",
"void AddTriangle(const vector2&in p1, const vector2&in p2, const vector2&in p3, const color&in col, float thickness = 1.f)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::Vector2
const& p1, Ogre::Vector2
const& p2, Ogre::Vector2
const& p3, Ogre::ColourValue
const& col,
float thickness) { drawlist->AddTriangle(ImVec2(p1.x, p1.y), ImVec2(p2.x, p2.y), ImVec2(p3.x, p3.y), ImColor(col.r, col.g, col.b, col.a), thickness); }, (ImDrawList*, Ogre::Vector2
const&, Ogre::Vector2
const&, Ogre::Vector2
const&, Ogre::ColourValue
const&, float),
void), asCALL_CDECL_OBJFIRST);
191 engine->RegisterObjectMethod(
"ImDrawList",
"void AddTriangleFilled(const vector2&in p1, const vector2&in p2, const vector2&in p3, const color&in col)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::Vector2
const& p1, Ogre::Vector2
const& p2, Ogre::Vector2
const& p3, Ogre::ColourValue
const& col) { drawlist->AddTriangleFilled(ImVec2(p1.x, p1.y), ImVec2(p2.x, p2.y), ImVec2(p3.x, p3.y), ImColor(col.r, col.g, col.b, col.a)); }, (ImDrawList*, Ogre::Vector2
const&, Ogre::Vector2
const&, Ogre::Vector2
const&, Ogre::ColourValue
const&),
void), asCALL_CDECL_OBJFIRST);
192 engine->RegisterObjectMethod(
"ImDrawList",
"void AddRect(const vector2&in p_min, const vector2&in p_max, const color&in col, float rounding = 0.0f, int rounding_corners = 15, float thickness = 1.f)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::Vector2
const& p1, Ogre::Vector2
const& p2, Ogre::ColourValue
const& col,
float rounding,
int rounding_corners,
float thickness) { drawlist->AddRect(ImVec2(p1.x, p1.y), ImVec2(p2.x, p2.y), ImColor(col.r, col.g, col.b, col.a), rounding, rounding_corners, thickness); }, (ImDrawList * drawlist, Ogre::Vector2
const& , Ogre::Vector2
const& , Ogre::ColourValue
const& , float , int , float ),
void), asCALL_CDECL_OBJFIRST);
193 engine->RegisterObjectMethod(
"ImDrawList",
"void AddRectFilled(const vector2&in p_min, const vector2&in p_max, const color&in col, float rounding = 0.0f, int rounding_corners = 15)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::Vector2
const& p1, Ogre::Vector2
const& p2, Ogre::ColourValue
const& col,
float rounding,
int rounding_corners) { drawlist->AddRectFilled(ImVec2(p1.x, p1.y), ImVec2(p2.x, p2.y), ImColor(col.r, col.g, col.b, col.a), rounding, rounding_corners); }, (ImDrawList * drawlist, Ogre::Vector2
const&, Ogre::Vector2
const&, Ogre::ColourValue
const&, float, int),
void), asCALL_CDECL_OBJFIRST);
194 engine->RegisterObjectMethod(
"ImDrawList",
"void AddCircle(const vector2&in center, float radius, const color&in col, int num_segments = 12, float thickness = 1.f)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::Vector2
const& center,
float radius, Ogre::ColourValue
const& col,
int num_segments,
float thickness) { drawlist->AddCircle(ImVec2(center.x, center.y), radius, ImColor(col.r, col.g, col.b, col.a), num_segments, thickness); }, (ImDrawList*, Ogre::Vector2
const&, float, Ogre::ColourValue
const&, int, float),
void), asCALL_CDECL_OBJFIRST);
195 engine->RegisterObjectMethod(
"ImDrawList",
"void AddCircleFilled(const vector2&in center, float radius, const color&in col, int num_segments = 12)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::Vector2
const& center,
float radius, Ogre::ColourValue
const& col,
int num_segments) { drawlist->AddCircleFilled(ImVec2(center.x, center.y), radius, ImColor(col.r, col.g, col.b, col.a), num_segments); }, (ImDrawList*, Ogre::Vector2
const&, float, Ogre::ColourValue
const&, int),
void), asCALL_CDECL_OBJFIRST);
196 engine->RegisterObjectMethod(
"ImDrawList",
"void AddText(const vector2&in pos, const color&in col, const string&in text)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::Vector2
const& pos, Ogre::ColourValue
const& col, std::string
const& text) { drawlist->AddText(ImVec2(pos.x, pos.y), ImColor(col.r, col.g, col.b, col.a), text.c_str()); }, (ImDrawList * drawlist, Ogre::Vector2
const&, Ogre::ColourValue
const&, std::string
const&),
void), asCALL_CDECL_OBJFIRST);
197 engine->RegisterObjectMethod(
"ImDrawList",
"void AddImage(const Ogre::TexturePtr&in tex, const vector2&in p_min, const vector2&in p_max, const vector2&in uv_min, const vector2&in uv_max, const color&in col)", asFUNCTIONPR([](ImDrawList* drawlist, Ogre::TexturePtr
const& tex, Ogre::Vector2
const& p_min, Ogre::Vector2
const& p_max, Ogre::Vector2
const& uv_min, Ogre::Vector2
const& uv_max, Ogre::ColourValue
const& col) { drawlist->AddImage((ImTextureID)tex->getHandle(), ImVec2(p_min.x, p_min.y), ImVec2(p_max.x, p_max.y), ImVec2(uv_min.x, uv_min.y), ImVec2(uv_max.x, uv_max.y), ImColor(col.r, col.g, col.b, col.a)); }, (ImDrawList*, Ogre::TexturePtr
const&, Ogre::Vector2
const&, Ogre::Vector2
const&, Ogre::Vector2
const&, Ogre::Vector2
const&, Ogre::ColourValue
const&),
void), asCALL_CDECL_OBJFIRST);
199 engine->SetDefaultNamespace(
"ImGui");
202 engine->RegisterGlobalFunction(
"bool Begin(const string&in, bool&inout, int=0)", asFUNCTIONPR([](
const string& name,
bool& opened,
int flags) {
return ImGui::Begin(name.c_str(), &opened, flags); }, (
const string&,
bool&, int),
bool), asCALL_CDECL);
203 engine->RegisterGlobalFunction(
"void End()", asFUNCTIONPR(ImGui::End, (), void), asCALL_CDECL);
206 engine->RegisterGlobalFunction(
"bool BeginChild(const string&in, const vector2&in=vector2(0,0), bool=false, int=0)", asFUNCTIONPR([](
const string& name,
const Ogre::Vector2& size,
bool border,
int flags) {
return ImGui::BeginChild(name.c_str(), ImVec2(size.x, size.y), border, flags); }, (
const string&,
const Ogre::Vector2&, bool, int),
bool), asCALL_CDECL);
207 engine->RegisterGlobalFunction(
"bool BeginChild(uint, const vector2&in=vector2(0,0), bool=false, int=0)", asFUNCTIONPR([](ImGuiID
id,
const Ogre::Vector2& size,
bool border,
int flags) {
return ImGui::BeginChild(
id, ImVec2(size.x, size.y), border, flags); }, (ImGuiID,
const Ogre::Vector2&, bool, int),
bool), asCALL_CDECL);
208 engine->RegisterGlobalFunction(
"void EndChild()", asFUNCTIONPR(ImGui::EndChild, (), void), asCALL_CDECL);
209 engine->RegisterGlobalFunction(
"ImDrawList@ GetWindowDrawList()", asFUNCTIONPR(ImGui::GetWindowDrawList, (), ImDrawList*), asCALL_CDECL);
210 engine->RegisterGlobalFunction(
"void PushStyleVar(int index, float val)", asFUNCTIONPR([](
int index,
float val) { ImGui::PushStyleVar(index,val); }, (int, float),
void), asCALL_CDECL);
211 engine->RegisterGlobalFunction(
"void PushStyleVar(int index, const vector2&in val)", asFUNCTIONPR([](
int index,
const Ogre::Vector2& val) { ImGui::PushStyleVar(index, ImVec2(val.x, val.y)); }, (int,
const Ogre::Vector2 &),
void), asCALL_CDECL);
212 engine->RegisterGlobalFunction(
"void PopStyleVar(int count = 1)", asFUNCTION(ImGui::PopStyleVar), asCALL_CDECL);
213 engine->RegisterGlobalFunction(
"void PushStyleColor(int index, const color&in color)", asFUNCTIONPR([](
int index, Ogre::ColourValue
const& col) { ImGui::PushStyleColor(index, (ImU32)ImColor(col.r, col.g, col.b, col.a)); }, (int, Ogre::ColourValue
const&),
void), asCALL_CDECL);
214 engine->RegisterGlobalFunction(
"void PopStyleColor(int count = 1)", asFUNCTIONPR(ImGui::PopStyleColor, (
int), void), asCALL_CDECL);
215 engine->RegisterGlobalFunction(
"void SetNextItemWidth(float)", asFUNCTIONPR(ImGui::SetNextItemWidth, (
float), void), asCALL_CDECL);
216 engine->RegisterGlobalFunction(
"void SetNextItemOpen(bool, ImGuiCond)", asFUNCTIONPR(ImGui::SetNextItemOpen, (
bool,
int), void), asCALL_CDECL);
218 engine->RegisterGlobalFunction(
"vector2 GetContentRegionMax()", asFUNCTIONPR([]() {
219 auto v = ImGui::GetContentRegionMax();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
220 engine->RegisterGlobalFunction(
"vector2 GetContentRegionAvail()", asFUNCTIONPR([]() {
221 auto v = ImGui::GetContentRegionAvail();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
222 engine->RegisterGlobalFunction(
"float GetContentRegionAvailWidth()", asFUNCTIONPR(ImGui::GetContentRegionAvailWidth, (), float), asCALL_CDECL);
223 engine->RegisterGlobalFunction(
"vector2 GetWindowContentRegionMin()", asFUNCTIONPR([]() {
224 auto v = ImGui::GetWindowContentRegionMin();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
225 engine->RegisterGlobalFunction(
"vector2 GetWindowContentRegionMax()", asFUNCTIONPR([]() {
226 auto v = ImGui::GetWindowContentRegionMax();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
227 engine->RegisterGlobalFunction(
"float GetWindowRegionWidth()", asFUNCTIONPR(ImGui::GetWindowContentRegionWidth, (), float), asCALL_CDECL);
229 engine->RegisterGlobalFunction(
"vector2 GetWindowPos()", asFUNCTIONPR([]() {
230 auto v = ImGui::GetWindowPos();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
231 engine->RegisterGlobalFunction(
"vector2 GetWindowSize()", asFUNCTIONPR([]() {
232 auto v = ImGui::GetWindowSize();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
233 engine->RegisterGlobalFunction(
"float GetWindowWedth()", asFUNCTIONPR(ImGui::GetWindowWidth, (), float), asCALL_CDECL);
234 engine->RegisterGlobalFunction(
"float GetWindowHeight()", asFUNCTIONPR(ImGui::GetWindowHeight, (), float), asCALL_CDECL);
235 engine->RegisterGlobalFunction(
"bool IsWindowCollapsed()", asFUNCTIONPR(ImGui::IsWindowCollapsed, (), bool), asCALL_CDECL);
237 engine->RegisterGlobalFunction(
"void SetWindowFontScale(float)", asFUNCTIONPR(ImGui::SetWindowFontScale, (
float), void), asCALL_CDECL);
239 engine->RegisterGlobalFunction(
"void SetNextWindowPos(vector2)", asFUNCTIONPR([](Vector2 v) {
240 ImGui::SetNextWindowPos(ImVec2(v.x, v.y)); }, (Vector2),
void), asCALL_CDECL);
241 engine->RegisterGlobalFunction(
"void SetNextWindowSize(vector2)", asFUNCTIONPR([](Vector2 v) {
242 ImGui::SetNextWindowSize(ImVec2(v.x, v.y)); }, (Vector2),
void), asCALL_CDECL);
243 engine->RegisterGlobalFunction(
"void SetNextWindowContentSize(vector2)", asFUNCTIONPR([](Vector2 v) {
244 ImGui::SetNextWindowContentSize(ImVec2(v.x, v.y)); }, (Vector2),
void), asCALL_CDECL);
245 engine->RegisterGlobalFunction(
"void SetNextWindowCollapsed(bool)", asFUNCTIONPR([](
bool v) {
246 ImGui::SetNextWindowCollapsed(v); }, (bool),
void), asCALL_CDECL);
247 engine->RegisterGlobalFunction(
"void SetNextWindowFocus()", asFUNCTIONPR([]() {
248 ImGui::SetNextWindowFocus(); }, (),
void), asCALL_CDECL);
249 engine->RegisterGlobalFunction(
"void SetWindowPos(vector2)", asFUNCTIONPR([](Vector2 v) {
250 ImGui::SetWindowPos(ImVec2(v.x, v.y)); }, (Vector2),
void), asCALL_CDECL);
251 engine->RegisterGlobalFunction(
"void SetWindowSize(vector2)", asFUNCTIONPR([](Vector2 v) {
252 ImGui::SetWindowSize(ImVec2(v.x, v.y)); }, (Vector2),
void), asCALL_CDECL);
253 engine->RegisterGlobalFunction(
"void SetWindowCollapsed(bool)", asFUNCTIONPR([](
bool v) {
254 ImGui::SetWindowCollapsed(v); }, (bool),
void), asCALL_CDECL);
255 engine->RegisterGlobalFunction(
"void SetWindowFocus()", asFUNCTIONPR([]() { ImGui::SetWindowFocus(); }, (),
void), asCALL_CDECL);
257 engine->RegisterGlobalFunction(
"void SetWindowPos(const string&in, vector2)", asFUNCTIONPR([](
const string& name, Vector2 v) {
258 ImGui::SetWindowPos(name.c_str(), ImVec2(v.x, v.y)); }, (
const string&, Vector2),
void), asCALL_CDECL);
259 engine->RegisterGlobalFunction(
"void SetWindowSize(const string&in, vector2)", asFUNCTIONPR([](
const string& name, Vector2 v) {
260 ImGui::SetWindowSize(name.c_str(), ImVec2(v.x, v.y)); }, (
const string&, Vector2),
void), asCALL_CDECL);
261 engine->RegisterGlobalFunction(
"void SetWindowCollapsed(const string&in, bool)", asFUNCTIONPR([](
const string& name,
bool v) {
262 ImGui::SetWindowCollapsed(name.c_str(), v); }, (
const string&, bool),
void), asCALL_CDECL);
263 engine->RegisterGlobalFunction(
"void SetWindowFocus(const string&in)", asFUNCTIONPR([](
const string& v) {
264 ImGui::SetWindowFocus(v.c_str()); }, (
const string&),
void), asCALL_CDECL);
266 engine->RegisterGlobalFunction(
"float GetScrollX()", asFUNCTIONPR(ImGui::GetScrollX, (), float), asCALL_CDECL);
267 engine->RegisterGlobalFunction(
"float GetScrollY()", asFUNCTIONPR(ImGui::GetScrollY, (), float), asCALL_CDECL);
268 engine->RegisterGlobalFunction(
"float GetScrollMaxX()", asFUNCTIONPR(ImGui::GetScrollMaxX, (), float), asCALL_CDECL);
269 engine->RegisterGlobalFunction(
"float GetScrollMaxY()", asFUNCTIONPR(ImGui::GetScrollMaxY, (), float), asCALL_CDECL);
270 engine->RegisterGlobalFunction(
"void SetScrollX(float)", asFUNCTIONPR(ImGui::SetScrollX, (
float), void), asCALL_CDECL);
271 engine->RegisterGlobalFunction(
"void SetScrollY(float)", asFUNCTIONPR(ImGui::SetScrollY, (
float), void), asCALL_CDECL);
272 engine->RegisterGlobalFunction(
"void SetScrollHere(float = 0.5f)", asFUNCTIONPR(ImGui::SetScrollHere, (
float), void), asCALL_CDECL);
273 engine->RegisterGlobalFunction(
"void SetScrollFromPosY(float, float = 0.5f)", asFUNCTIONPR(ImGui::SetScrollFromPosY, (
float,
float), void), asCALL_CDECL);
275 engine->RegisterGlobalFunction(
"void Separator()", asFUNCTIONPR(ImGui::Separator, (), void), asCALL_CDECL);
276 engine->RegisterGlobalFunction(
"void SameLine(float = 0.0f, float = -1.0f)", asFUNCTIONPR(ImGui::SameLine, (
float,
float), void), asCALL_CDECL);
277 engine->RegisterGlobalFunction(
"void NewLine()", asFUNCTIONPR(ImGui::NewLine, (), void), asCALL_CDECL);
278 engine->RegisterGlobalFunction(
"void Spacing()", asFUNCTIONPR(ImGui::Spacing, (), void), asCALL_CDECL);
279 engine->RegisterGlobalFunction(
"void Dummy(vector2)", asFUNCTIONPR([](Vector2 v) { ImGui::Dummy(ImVec2(v.x, v.y)); }, (Vector2),
void), asCALL_CDECL);
280 engine->RegisterGlobalFunction(
"void Indent(float = 0.0f)", asFUNCTIONPR(ImGui::Indent, (
float), void), asCALL_CDECL);
281 engine->RegisterGlobalFunction(
"void Unindent(float = 0.0f)", asFUNCTIONPR(ImGui::Unindent, (
float), void), asCALL_CDECL);
282 engine->RegisterGlobalFunction(
"void BeginGroup()", asFUNCTIONPR(ImGui::BeginGroup, (), void), asCALL_CDECL);
283 engine->RegisterGlobalFunction(
"void EndGroup()", asFUNCTIONPR(ImGui::EndGroup, (), void), asCALL_CDECL);
284 engine->RegisterGlobalFunction(
"vector2 GetCursorPos()", asFUNCTIONPR([]() {
auto v = ImGui::GetCursorPos();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
285 engine->RegisterGlobalFunction(
"float GetCursorPosX()", asFUNCTIONPR(ImGui::GetCursorPosX, (), float), asCALL_CDECL);
286 engine->RegisterGlobalFunction(
"float GetCursorPosY()", asFUNCTIONPR(ImGui::GetCursorPosY, (), float), asCALL_CDECL);
287 engine->RegisterGlobalFunction(
"void SetCursorPos(vector2)", asFUNCTIONPR([](Vector2 v) { ImGui::SetCursorPos(ImVec2(v.x, v.y)); }, (Vector2),
void), asCALL_CDECL);
288 engine->RegisterGlobalFunction(
"void SetCursorPosX(float)", asFUNCTIONPR(ImGui::SetCursorPosX, (
float), void), asCALL_CDECL);
289 engine->RegisterGlobalFunction(
"void SetCursorPosY(float)", asFUNCTIONPR(ImGui::SetCursorPosY, (
float), void), asCALL_CDECL);
290 engine->RegisterGlobalFunction(
"vector2 GetCursorStartPos()", asFUNCTIONPR([]() {
auto v = ImGui::GetCursorStartPos();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
291 engine->RegisterGlobalFunction(
"vector2 GetCursorScreenPos()", asFUNCTIONPR([]() {
auto v = ImGui::GetCursorScreenPos();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
292 engine->RegisterGlobalFunction(
"void SetCursorScreenPos(vector2)", asFUNCTIONPR([](Vector2 v) { ImGui::SetCursorScreenPos(ImVec2(v.x, v.y)); }, (Vector2),
void), asCALL_CDECL);
293 engine->RegisterGlobalFunction(
"void AlignTextToFramePadding()", asFUNCTIONPR(ImGui::AlignTextToFramePadding, (), void), asCALL_CDECL);
294 engine->RegisterGlobalFunction(
"float GetTextLineHeight()", asFUNCTIONPR(ImGui::GetTextLineHeight, (), float), asCALL_CDECL);
295 engine->RegisterGlobalFunction(
"float GetTextLineHeightWithSpacing()", asFUNCTIONPR(ImGui::GetTextLineHeightWithSpacing, (), float), asCALL_CDECL);
300 engine->RegisterGlobalFunction(
"void Columns(int = 1, const string&in = string(), bool = true)", asFUNCTIONPR([](
int a,
const string& b,
bool c) {
301 ImGui::Columns(a, b.c_str(), c); }, (int,
const string&, bool),
void), asCALL_CDECL);
302 engine->RegisterGlobalFunction(
"void NextColumn()", asFUNCTIONPR([]() { ImGui::NextColumn(); }, (),
void), asCALL_CDECL);
303 engine->RegisterGlobalFunction(
"int GetColumnIndex()", asFUNCTIONPR([]() {
return ImGui::GetColumnIndex(); }, (),
int), asCALL_CDECL);
304 engine->RegisterGlobalFunction(
"float GetColumnWidth(int = -1)", asFUNCTIONPR([](
int a) {
return ImGui::GetColumnWidth(a); }, (int),
float), asCALL_CDECL);
306 engine->RegisterGlobalFunction(
"float GetColumnOffset(int = -1)", asFUNCTIONPR([](
int a) {
return ImGui::GetColumnOffset(a); }, (int),
float), asCALL_CDECL);
307 engine->RegisterGlobalFunction(
"void SetColumnOffset(int, float)", asFUNCTIONPR([](
int a,
float b) { ImGui::SetColumnOffset(a, b); }, (int,float),
void), asCALL_CDECL);
308 engine->RegisterGlobalFunction(
"int GetColumnsCount()", asFUNCTIONPR([]() {
return ImGui::GetColumnsCount(); }, (),
int), asCALL_CDECL);
312 engine->RegisterGlobalFunction(
"bool BeginTabBar(const string&in, int = 0)", asFUNCTIONPR([](
const string& str_id, ImGuiTabBarFlags flags) {
return ImGui::BeginTabBar(str_id.c_str(), flags); }, (
const string&, ImGuiTabBarFlags),
bool), asCALL_CDECL);
313 engine->RegisterGlobalFunction(
"void EndTabBar()", asFUNCTION(ImGui::EndTabBar), asCALL_CDECL);
315 engine->RegisterGlobalFunction(
"bool BeginTabItem(const string&in, int = 0)", asFUNCTIONPR([](
const string& label, ImGuiTabItemFlags flags) {
return ImGui::BeginTabItem(label.c_str(),
nullptr, flags); }, (
const string&, ImGuiTabItemFlags),
bool), asCALL_CDECL);
317 engine->RegisterGlobalFunction(
"bool BeginTabItem(const string&in, bool&inout, int = 0)", asFUNCTIONPR([](
const string& label,
bool& p_open, ImGuiTabItemFlags flags) {
return ImGui::BeginTabItem(label.c_str(), &p_open, flags); }, (
const string&,
bool&, ImGuiTabItemFlags),
bool), asCALL_CDECL);
318 engine->RegisterGlobalFunction(
"void EndTabItem()", asFUNCTION(ImGui::EndTabItem), asCALL_CDECL);
320 engine->RegisterGlobalFunction(
"void SetTabItemClosed(const string&in)", asFUNCTIONPR([](
const string& tab_or_docked_window_label) { ImGui::SetTabItemClosed(tab_or_docked_window_label.c_str()); }, (
const string&),
void), asCALL_CDECL);
324 engine->RegisterGlobalFunction(
"void PushID(const string&in)", asFUNCTIONPR([](
const string& n) { ImGui::PushID(n.c_str()); }, (
const string&),
void), asCALL_CDECL);
325 engine->RegisterGlobalFunction(
"void PushID(int int_id)", asFUNCTIONPR([](
int id) { ImGui::PushID(
id); }, (int),
void), asCALL_CDECL);
326 engine->RegisterGlobalFunction(
"void PopID()", asFUNCTIONPR(ImGui::PopID, (), void), asCALL_CDECL);
327 engine->RegisterGlobalFunction(
"uint GetID(const string&in)", asFUNCTIONPR([](
const string& n) {
return ImGui::GetID(n.c_str()); }, (
const string&),
unsigned), asCALL_CDECL);
330 engine->RegisterGlobalFunction(
"void Text(const string&in)", asFUNCTIONPR([](
const string& n) {
331 ImGui::Text(n.c_str());
332 }, (
const string&),
void), asCALL_CDECL);
333 engine->RegisterGlobalFunction(
"void TextDisabled(const string&in)", asFUNCTIONPR([](
const string& n) {
334 ImGui::TextDisabled(n.c_str());
335 }, (
const string&),
void), asCALL_CDECL);
336 engine->RegisterGlobalFunction(
"void TextColored(color col, const string&in)", asFUNCTIONPR([](ColourValue c,
const string& n) {
337 ImGui::TextColored(ImVec4(c.r, c.g, c.b, c.a), n.c_str());
338 }, (ColourValue,
const string&),
void), asCALL_CDECL);
339 engine->RegisterGlobalFunction(
"void TextWrapped(const string&in)", asFUNCTIONPR([](
const string& n) {
340 ImGui::TextWrapped(n.c_str()); }, (
const string&),
void), asCALL_CDECL);
341 engine->RegisterGlobalFunction(
"void LabelText(const string&in, const string&in)", asFUNCTIONPR([](
const string& l,
const string& n) {
342 ImGui::LabelText(l.c_str(), n.c_str()); }, (
const string&,
const string&),
void), asCALL_CDECL);
343 engine->RegisterGlobalFunction(
"void Bullet()", asFUNCTIONPR(ImGui::Bullet, (), void), asCALL_CDECL);
344 engine->RegisterGlobalFunction(
"void BulletText(const string&in)", asFUNCTIONPR([](
const string& n) {
345 ImGui::BulletText(n.c_str()); }, (
const string&),
void), asCALL_CDECL);
348 engine->RegisterGlobalFunction(
"bool Button(const string&in, vector2 = vector2(0,0))", asFUNCTIONPR([](
const string& n, Vector2 v) {
349 return ImGui::Button(n.c_str(), ImVec2(v.x, v.y));
350 }, (
const string&, Vector2),
bool), asCALL_CDECL);
351 engine->RegisterGlobalFunction(
"bool SmallButton(const string&in)", asFUNCTIONPR([](
const string& n) {
352 return ImGui::SmallButton(n.c_str()); }, (
const string&),
bool), asCALL_CDECL);
353 engine->RegisterGlobalFunction(
"bool InvisibleButton(const string&in, vector2)", asFUNCTIONPR([](
const string&
id, Vector2 v) {
354 return ImGui::InvisibleButton(
id.c_str(), ImVec2(v.x, v.y)); }, (
const string&, Vector2),
bool), asCALL_CDECL);
355 engine->RegisterGlobalFunction(
"void Image(const Ogre::TexturePtr&in, vector2)", asFUNCTIONPR([](Ogre::TexturePtr
const& tex, Vector2 v) {
356 ImGui::Image((ImTextureID)tex->getHandle(), ImVec2(v.x, v.y));
357 }, (Ogre::TexturePtr
const&, Vector2),
void), asCALL_CDECL);
358 engine->RegisterGlobalFunction(
"bool Checkbox(const string&in, bool&inout)", asFUNCTIONPR([](
const string& n,
bool& v) {
359 return ImGui::Checkbox(n.c_str(), &v); }, (
const string&,
bool&),
bool), asCALL_CDECL);
360 engine->RegisterGlobalFunction(
"bool CheckboxFlags(const string&in, uint&inout, uint)", asFUNCTIONPR([](
const string& n,
unsigned& f,
unsigned v) {
361 return ImGui::CheckboxFlags(n.c_str(), &f, v); }, (
const string&,
unsigned&, unsigned),
bool), asCALL_CDECL);
362 engine->RegisterGlobalFunction(
"bool RadioButton(const string&in, bool)", asFUNCTIONPR([](
const string& n,
bool v) {
363 return ImGui::RadioButton(n.c_str(), v); }, (
const string&, bool),
bool), asCALL_CDECL);
364 engine->RegisterGlobalFunction(
"bool RadioButton(const string&in, int&inout, int)", asFUNCTIONPR([](
const string& n,
int& v,
int vv) {
365 return ImGui::RadioButton(n.c_str(), &v, vv); }, (
const string&,
int&, int),
bool), asCALL_CDECL);
366 engine->RegisterGlobalFunction(
"void ProgressBar(float, vector2=vector2(-1,0), const string&in = \"\")", asFUNCTIONPR([](
float v, Ogre::Vector2 size,
const string& overlay) {
367 ImGui::ProgressBar(v, ImVec2(size.x, size.y), (overlay !=
"")?overlay.c_str():
nullptr); }, (float, Ogre::Vector2,
const string&),
void), asCALL_CDECL);
388 engine->RegisterGlobalFunction(
"bool DragFloat(const string&in, float&inout, float = 1.0f, float = 0.0f, float = 0.0f)", asFUNCTIONPR([](
const string& n,
float& v,
float speed,
float mn,
float mx) {
389 return ImGui::DragFloat(n.c_str(), &v, speed, mn, mx); }, (
const string&,
float&, float, float, float),
bool), asCALL_CDECL);
390 engine->RegisterGlobalFunction(
"bool DragFloat2(const string&in, vector2&inout)", asFUNCTIONPR([](
const string& n, Vector2& v) {
391 return ImGui::DragFloat2(n.c_str(), &v.x); }, (
const string&, Vector2&),
bool), asCALL_CDECL);
392 engine->RegisterGlobalFunction(
"bool DragFloat3(const string&in, vector3&inout)", asFUNCTIONPR([](
const string& n, Vector3& v) {
393 return ImGui::DragFloat3(n.c_str(), &v.x); }, (
const string&, Vector3&),
bool), asCALL_CDECL);
404 engine->RegisterGlobalFunction(
"bool DragFloatRange2(const string&in, float&inout, float&inout, float = 0.0f, float = 1.0f)", asFUNCTIONPR([](
const string& n,
float& v0,
float&v1,
float mn,
float mx) {
405 return ImGui::DragFloatRange2(n.c_str(), &v0, &v1, 1.0f, mn, mx); }, (
const string&,
float&,
float&, float, float),
bool), asCALL_CDECL);
406 engine->RegisterGlobalFunction(
"bool DragIntRange2(const string&in, int&inout, int&inout, int, int)", asFUNCTIONPR([](
const string& n,
int& v0,
int&v1,
int mn,
int mx) {
407 return ImGui::DragIntRange2(n.c_str(), &v0, &v1, 1.0f, mn, mx); }, (
const string&,
int&,
int&, int, int),
bool), asCALL_CDECL);
410 static char imgui_text_buffer[4096];
411 engine->RegisterGlobalFunction(
"bool InputText(const string&in, string&inout)", asFUNCTIONPR([](
const string&
id,
string& val) {
412 memset(imgui_text_buffer, 0,
sizeof(
char) * 4096);
413 strcpy(imgui_text_buffer, val.c_str());
414 if (ImGui::InputText(
id.c_str(), imgui_text_buffer, 4096))
416 val = imgui_text_buffer;
420 }, (
const string&,
string&),
bool), asCALL_CDECL);
421 engine->RegisterGlobalFunction(
"bool InputTextMultiline(const string&in, string&inout, const vector2&in = vector2(0,0))", asFUNCTIONPR([](
const string&
id,
string& val,
const Ogre::Vector2& size) {
422 return ImGui::InputTextMultiline(
id.c_str(), (
char*)val.data(), val.size(), ImVec2(size.x, size.y));
423 }, (
const string&,
string&,
const Ogre::Vector2&),
bool), asCALL_CDECL);
424 engine->RegisterGlobalFunction(
"bool InputFloat(const string&, float&inout)", asFUNCTIONPR([](
const string&
id,
float& val) {
425 return ImGui::InputFloat(
id.c_str(), &val); }, (
const string&,
float&),
bool), asCALL_CDECL);
426 engine->RegisterGlobalFunction(
"bool InputFloat2(const string&, vector2&inout)", asFUNCTIONPR([](
const string&
id, Vector2& val) {
427 return ImGui::InputFloat2(
id.c_str(), &val.x); }, (
const string&, Vector2&),
bool), asCALL_CDECL);
428 engine->RegisterGlobalFunction(
"bool InputFloat3(const string&, vector3&inout)", asFUNCTIONPR([](
const string&
id, Vector3& val) {
429 return ImGui::InputFloat3(
id.c_str(), &val.x); }, (
const string&, Vector3&),
bool), asCALL_CDECL);
434 engine->RegisterGlobalFunction(
"bool InputInt(const string&, int&inout)", asFUNCTIONPR([](
const string&
id,
int& val) {
435 return ImGui::InputInt(
id.c_str(), &val); }, (
const string&,
int&),
bool), asCALL_CDECL);
444 engine->RegisterGlobalFunction(
"bool SliderFloat(const string&in, float&inout, float = 0.0f, float = 0.0f)", asFUNCTIONPR([](
const string& n,
float& v,
float mn,
float mx) {
445 return ImGui::SliderFloat(n.c_str(), &v, mn, mx); }, (
const string&,
float&, float,float),
bool), asCALL_CDECL);
446 engine->RegisterGlobalFunction(
"bool SliderFloat2(const string&in, vector2&inout, float, float)", asFUNCTIONPR([](
const string& n, Vector2& v,
float mn,
float mx) {
447 return ImGui::SliderFloat2(n.c_str(), &v.x, mn, mx); }, (
const string&, Vector2&, float,float),
bool), asCALL_CDECL);
448 engine->RegisterGlobalFunction(
"bool SliderFloat3(const string&in, vector3&inout, float, float)", asFUNCTIONPR([](
const string& n, Vector3& v,
float mn,
float mx) {
449 return ImGui::SliderFloat3(n.c_str(), &v.x, mn, mx); }, (
const string&, Vector3&, float,float),
bool), asCALL_CDECL);
450 engine->RegisterGlobalFunction(
"bool SliderInt(const string&in, int&inout, int = 0, int = 0)", asFUNCTIONPR([](
const string& n,
int& v,
int mn,
int mx) {
451 return ImGui::SliderInt(n.c_str(), &v, mn, mx); }, (
const string&,
int&, int, int),
bool), asCALL_CDECL);
463 engine->RegisterGlobalFunction(
"bool ColorEdit3(const string&in, color&inout)", asFUNCTIONPR([](
const string&
id, ColourValue& val) {
464 Vector3 v(val.r, val.g, val.b);
465 if (ImGui::ColorEdit3(
id.c_str(), &v.x))
467 val = ColourValue(v.x, v.y, v.z);
471 }, (
const string&, ColourValue&),
bool), asCALL_CDECL);
472 engine->RegisterGlobalFunction(
"bool ColorEdit4(const string&in, color&inout)", asFUNCTIONPR([](
const string&
id, ColourValue& val) {
473 Vector4 v(val.r, val.g, val.b, val.a);
474 if (ImGui::ColorEdit4(
id.c_str(), &v.x))
476 val = ColourValue(v.x, v.y, v.z, v.w);
480 }, (
const string&, ColourValue&),
bool), asCALL_CDECL);
499 engine->RegisterGlobalFunction(
"bool ColorButton(const string&in, color)", asFUNCTIONPR([](
const string&
id, ColourValue val) {
500 Vector4 v(val.r, val.g, val.b, val.a);
501 ImVec4 vv(v.x, v.y, v.z, v.w);
502 return ImGui::ColorButton(
id.c_str(), vv);
503 }, (
const string&, ColourValue),
bool), asCALL_CDECL);
506 engine->RegisterGlobalFunction(
"bool TreeNode(const string&in)", asFUNCTIONPR([](
const string&
id) {
return ImGui::TreeNode(
id.c_str()); }, (
const string&),
bool), asCALL_CDECL);
507 engine->RegisterGlobalFunction(
"void TreePush(const string&in)", asFUNCTIONPR([](
const string&
id) { ImGui::TreePush(
id.c_str()); }, (
const string&),
void), asCALL_CDECL);
508 engine->RegisterGlobalFunction(
"void TreePop()", asFUNCTIONPR(ImGui::TreePop, (), void), asCALL_CDECL);
509 engine->RegisterGlobalFunction(
"void TreeAdvanceToLabelPos()", asFUNCTIONPR(ImGui::TreeAdvanceToLabelPos, (), void), asCALL_CDECL);
510 engine->RegisterGlobalFunction(
"float GetTreeNodeToLabelSpacing()", asFUNCTIONPR(ImGui::GetTreeNodeToLabelSpacing, (), float), asCALL_CDECL);
511 engine->RegisterGlobalFunction(
"void SetNextTreeNodeOpen(bool)", asFUNCTIONPR([](
bool val) { ImGui::SetNextTreeNodeOpen(val); }, (bool),
void), asCALL_CDECL);
512 engine->RegisterGlobalFunction(
"bool CollapsingHeader(const string&in)", asFUNCTIONPR([](
const string& n) {
return ImGui::CollapsingHeader(n.c_str()); }, (
const string&),
bool), asCALL_CDECL);
513 engine->RegisterGlobalFunction(
"bool CollapsingHeader(const string&in, bool&inout)", asFUNCTIONPR([](
const string& n,
bool& v) {
return ImGui::CollapsingHeader(n.c_str(), &v); }, (
const string&,
bool&),
bool), asCALL_CDECL);
516 engine->RegisterGlobalFunction(
"bool Selectable(const string&in, bool = false)", asFUNCTIONPR([](
const string& n,
bool v) {
return ImGui::Selectable(n.c_str(), v); }, (
const string&, bool),
bool), asCALL_CDECL);
517 engine->RegisterGlobalFunction(
"bool ListBoxHeader(const string&in)", asFUNCTIONPR([](
const string& n) {
return ImGui::ListBoxHeader(n.c_str()); }, (
const string&),
bool), asCALL_CDECL);
520 engine->RegisterGlobalFunction(
"void Value(const string&in, bool)", asFUNCTIONPR([](
const string& n,
bool v) { ImGui::Value(n.c_str(), v); }, (
const string&, bool),
void), asCALL_CDECL);
521 engine->RegisterGlobalFunction(
"void Value(const string&in, int)", asFUNCTIONPR([](
const string& n,
int v) { ImGui::Value(n.c_str(), v); }, (
const string&, int),
void), asCALL_CDECL);
522 engine->RegisterGlobalFunction(
"void Value(const string&in, uint)", asFUNCTIONPR([](
const string& n,
unsigned v) { ImGui::Value(n.c_str(), v);}, (
const string&, unsigned),
void), asCALL_CDECL);
523 engine->RegisterGlobalFunction(
"void Value(const string&in, float)", asFUNCTIONPR([](
const string& n,
float v) { ImGui::Value(n.c_str(), v); }, (
const string&, float),
void), asCALL_CDECL);
526 engine->RegisterGlobalFunction(
"void BeginTooltip()", asFUNCTIONPR(ImGui::BeginTooltip , (), void), asCALL_CDECL);
527 engine->RegisterGlobalFunction(
"void EndTooltip()", asFUNCTIONPR(ImGui::EndTooltip , (), void), asCALL_CDECL);
528 engine->RegisterGlobalFunction(
"void SetTooltip(const string&in)", asFUNCTIONPR([](
const string& t) { ImGui::SetTooltip(t.c_str()); }, (
const string&),
void), asCALL_CDECL);
531 engine->RegisterGlobalFunction(
"bool BeginMainMenuBar()", asFUNCTIONPR([]() {
return ImGui::BeginMainMenuBar(); }, (),
bool), asCALL_CDECL);
532 engine->RegisterGlobalFunction(
"void EndMainMenuBar()", asFUNCTIONPR([]() { ImGui::EndMainMenuBar(); }, (),
void), asCALL_CDECL);
533 engine->RegisterGlobalFunction(
"bool BeginMenuBar()", asFUNCTIONPR([]() {
return ImGui::BeginMenuBar(); }, (),
bool), asCALL_CDECL);
534 engine->RegisterGlobalFunction(
"void EndMenuBar()", asFUNCTIONPR([]() { ImGui::EndMenuBar(); }, (),
void), asCALL_CDECL);
535 engine->RegisterGlobalFunction(
"bool BeginMenu(const string&in, bool = true)", asFUNCTIONPR([](
const string& a,
bool b) {
536 return ImGui::BeginMenu(a.c_str(), b); }, (
const string&, bool),
bool), asCALL_CDECL);
537 engine->RegisterGlobalFunction(
"void EndMenu()", asFUNCTIONPR([]() { ImGui::EndMenu(); }, (),
void), asCALL_CDECL);
538 engine->RegisterGlobalFunction(
"bool MenuItem(const string&in, const string&in = string(), bool = false, bool = true)", asFUNCTIONPR([](
const string& a,
const string& b,
bool c,
bool d) {
539 return ImGui::MenuItem(a.c_str(), b.c_str(), c, d); }, (
const string&,
const string&, bool, bool),
bool), asCALL_CDECL);
540 engine->RegisterGlobalFunction(
"bool MenuItem(const string&in, const string&in, bool &inout, bool = true)", asFUNCTIONPR([](
const string& a,
const string& b,
bool& c,
bool d) {
541 return ImGui::MenuItem(a.c_str(), b.c_str(), &c, d); }, (
const string&,
const string&,
bool&, bool),
bool), asCALL_CDECL);
544 engine->RegisterGlobalFunction(
"void OpenPopup(const string&in)", asFUNCTIONPR([](
const string& a) { ImGui::OpenPopup(a.c_str()); }, (
const string&),
void), asCALL_CDECL);
547 engine->RegisterGlobalFunction(
"bool BeginPopup(const string&in, int = 0)", asFUNCTIONPR([](
const string& a,
int b) {
548 return ImGui::BeginPopup(a.c_str()); }, (
const string&, int),
bool), asCALL_CDECL);
549 engine->RegisterGlobalFunction(
"bool BeginPopupContextItem(const string&in = string(), int = 1)", asFUNCTIONPR([](
const string& a,
int b) {
550 return ImGui::BeginPopupContextItem(a.c_str(), b); }, (
const string&, int),
bool), asCALL_CDECL);
551 engine->RegisterGlobalFunction(
"bool BeginPopupContextWindow(const string&in = string(), int = 1, bool = true)", asFUNCTIONPR([](
const string& a,
int b,
bool c) {
552 return ImGui::BeginPopupContextWindow(a.c_str(), b, c); }, (
const string&, int, bool),
bool), asCALL_CDECL);
553 engine->RegisterGlobalFunction(
"bool BeginPopupContextVoid(const string&in = string(), int = 1)", asFUNCTIONPR([](
const string& a,
int b) {
554 return ImGui::BeginPopupContextVoid(a.c_str(), b); }, (
const string&, int),
bool), asCALL_CDECL);
555 engine->RegisterGlobalFunction(
"bool BeginPopupModal(const string&in, bool &inout = null, int = 0)", asFUNCTIONPR([](
const string& a,
bool& b,
int c) {
556 return ImGui::BeginPopupModal(a.c_str(), &b, (ImGuiWindowFlags)c); }, (
const string&,
bool&, int),
bool), asCALL_CDECL);
557 engine->RegisterGlobalFunction(
"void EndPopup()", asFUNCTIONPR([]() { ImGui::EndPopup(); }, (),
void), asCALL_CDECL);
562 engine->RegisterGlobalFunction(
"void CloseCurrentPopup()", asFUNCTIONPR([]() { ImGui::CloseCurrentPopup(); }, (),
void), asCALL_CDECL);
565 engine->RegisterGlobalFunction(
"void PushClipRect(const vector2&, const vector2&, bool)", asFUNCTIONPR([](
const Vector2& a,
const Vector2& b,
bool c) {
566 ImGui::PushClipRect(ImVec2(a.x, a.y), ImVec2(b.x, b.y), c); }, (
const Vector2&,
const Vector2&, bool),
void), asCALL_CDECL);
567 engine->RegisterGlobalFunction(
"void PopClipRect()", asFUNCTIONPR([]() { ImGui::PopClipRect(); }, (),
void), asCALL_CDECL);
571 engine->RegisterGlobalFunction(
"void SetKeyboardFocusHere(int = 0)", asFUNCTIONPR([](
int a) { ImGui::SetKeyboardFocusHere(a); }, (int),
void), asCALL_CDECL);
574 engine->RegisterGlobalFunction(
"bool IsItemHovered(int = 0)", asFUNCTIONPR([](
int a) {
return ImGui::IsItemHovered(); }, (int),
bool), asCALL_CDECL);
575 engine->RegisterGlobalFunction(
"bool IsItemActive()", asFUNCTIONPR([]() {
return ImGui::IsItemActive(); }, (),
bool), asCALL_CDECL);
576 engine->RegisterGlobalFunction(
"bool IsItemClicked(int = 0)", asFUNCTIONPR([](
int a) {
return ImGui::IsItemClicked(a); }, (int),
bool), asCALL_CDECL);
577 engine->RegisterGlobalFunction(
"bool IsItemVisible()", asFUNCTIONPR([]() {
return ImGui::IsItemVisible(); }, (),
bool), asCALL_CDECL);
578 engine->RegisterGlobalFunction(
"bool IsAnyItemHovered()", asFUNCTIONPR([]() {
return ImGui::IsAnyItemHovered(); }, (),
bool), asCALL_CDECL);
579 engine->RegisterGlobalFunction(
"bool IsAnyItemActive()", asFUNCTIONPR([]() {
return ImGui::IsAnyItemActive(); }, (),
bool), asCALL_CDECL);
580 engine->RegisterGlobalFunction(
"vector2 GetItemRectMin()", asFUNCTIONPR([]() {
auto v = ImGui::GetItemRectMin();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
581 engine->RegisterGlobalFunction(
"vector2 GetItemRectMax()", asFUNCTIONPR([]() {
auto v = ImGui::GetItemRectMax();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
582 engine->RegisterGlobalFunction(
"vector2 GetItemRectSize()", asFUNCTIONPR([]() {
auto v = ImGui::GetItemRectSize();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
583 engine->RegisterGlobalFunction(
"void SetItemAllowOverlap()", asFUNCTIONPR([]() { ImGui::SetItemAllowOverlap(); }, (),
void), asCALL_CDECL);
584 engine->RegisterGlobalFunction(
"bool IsWindowFocused(int = 0)", asFUNCTIONPR([](
int a) {
return ImGui::IsWindowFocused(); }, (int),
bool), asCALL_CDECL);
585 engine->RegisterGlobalFunction(
"bool IsWindowHovered(int = 0)", asFUNCTIONPR([](
int a) {
return ImGui::IsWindowHovered(); }, (int),
bool), asCALL_CDECL);
586 engine->RegisterGlobalFunction(
"bool IsRectVisible(const vector2&)", asFUNCTIONPR([](
const Vector2& a) {
return ImGui::IsRectVisible(ImVec2(a.x, a.y)); }, (
const Vector2&),
bool), asCALL_CDECL);
587 engine->RegisterGlobalFunction(
"bool IsRectVisible(const vector2&, const vector2&)", asFUNCTIONPR([](
const Vector2& a,
const Vector2& b) {
return ImGui::IsRectVisible(ImVec2(a.x, a.y), ImVec2(b.x, b.y)); }, (
const Vector2&,
const Vector2&),
bool), asCALL_CDECL);
588 engine->RegisterGlobalFunction(
"float GetTime()", asFUNCTIONPR([]() {
return (
float)ImGui::GetTime(); }, (),
float), asCALL_CDECL);
589 engine->RegisterGlobalFunction(
"int GetFrameCount()", asFUNCTIONPR([]() {
return ImGui::GetFrameCount(); }, (),
int), asCALL_CDECL);
591 engine->RegisterGlobalFunction(
"vector2 CalcTextSize(const string&in, bool hide_text_after_double_hash = false, float wrap_width = -1.0f)", asFUNCTIONPR([](
const string& a,
bool c,
float d) {
592 auto v = ImGui::CalcTextSize(a.c_str(),
nullptr, c, d);
return Vector2(v.x, v.y); }, (
const string&, bool, float), Vector2), asCALL_CDECL);
593 engine->RegisterGlobalFunction(
"void CalcListClipping(int, float, int&inout, int&inout)", asFUNCTIONPR([](
int a,
float b,
int& c,
int& d) {
594 ImGui::CalcListClipping(a, b, &c, &d); }, (int,float,
int&,
int&),
void), asCALL_CDECL);
595 engine->RegisterGlobalFunction(
"bool BeginChildFrame(uint, const vector2&, int = 0)", asFUNCTIONPR([](
unsigned a,
const Vector2& b,
int c) {
596 return ImGui::BeginChildFrame(a, ImVec2(b.x,b.y), (ImGuiWindowFlags)c); }, (unsigned,
const Vector2&, int),
bool), asCALL_CDECL);
597 engine->RegisterGlobalFunction(
"void EndChildFrame()", asFUNCTIONPR([]() { ImGui::EndChildFrame(); }, (),
void), asCALL_CDECL);
599 engine->RegisterGlobalFunction(
"int GetKeyIndex(int)", asFUNCTIONPR([](
int a) {
return ImGui::GetKeyIndex((ImGuiKey)a); }, (int),
int), asCALL_CDECL);
600 engine->RegisterGlobalFunction(
"bool IsKeyDown(int)", asFUNCTIONPR([](
int a) {
return ImGui::IsKeyDown(a); }, (int),
bool), asCALL_CDECL);
601 engine->RegisterGlobalFunction(
"bool IsKeyPressed(int, bool = true)", asFUNCTIONPR([](
int a,
bool b) {
return ImGui::IsKeyPressed(a, b); }, (int,bool),
bool), asCALL_CDECL);
602 engine->RegisterGlobalFunction(
"bool IsKeyReleased(int)", asFUNCTIONPR([](
int a) {
return ImGui::IsKeyReleased(a); }, (int),
bool), asCALL_CDECL);
604 engine->RegisterGlobalFunction(
"bool IsMouseDown(int)", asFUNCTIONPR([](
int a) {
return ImGui::IsMouseDown(a); }, (int),
bool), asCALL_CDECL);
605 engine->RegisterGlobalFunction(
"bool IsMouseClicked(int, bool = false)", asFUNCTIONPR([](
int a,
bool b) {
return ImGui::IsMouseClicked(a, b); }, (int,bool),
bool), asCALL_CDECL);
606 engine->RegisterGlobalFunction(
"bool IsMouseDoubleClicked(int)", asFUNCTIONPR([](
int a) {
return ImGui::IsMouseDoubleClicked(a); }, (int),
bool), asCALL_CDECL);
607 engine->RegisterGlobalFunction(
"bool IsMouseReleased(int)", asFUNCTIONPR([](
int a) {
return ImGui::IsMouseReleased(a); }, (int),
bool), asCALL_CDECL);
608 engine->RegisterGlobalFunction(
"bool IsMouseDragging(int = 0, float = -1.0f)", asFUNCTIONPR([](
int a,
float b) {
return ImGui::IsMouseDragging(a, b); }, (int, float),
bool), asCALL_CDECL);
609 engine->RegisterGlobalFunction(
"bool IsMouseHoveringRect(const vector2&in, const vector2&in, bool = true)", asFUNCTIONPR([](
const Vector2& a,
const Vector2& b,
bool c) {
return ImGui::IsMouseHoveringRect(ImVec2(a.x, a.y), ImVec2(b.x, b.y), c); }, (
const Vector2&,
const Vector2&, bool),
bool), asCALL_CDECL);
611 engine->RegisterGlobalFunction(
"vector2 GetMousePos()", asFUNCTIONPR([]() {
auto v = ImGui::GetMousePos();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
612 engine->RegisterGlobalFunction(
"vector2 GetMousePosOnOpeningCurrentPopup()", asFUNCTIONPR([]() {
auto v = ImGui::GetMousePosOnOpeningCurrentPopup();
return Vector2(v.x, v.y); }, (), Vector2), asCALL_CDECL);
613 engine->RegisterGlobalFunction(
"vector2 GetMouseDragDelta(int = 0, float = -1.0f)", asFUNCTIONPR([](
int a,
float b) {
auto v = ImGui::GetMouseDragDelta(a, b);
return Vector2(v.x, v.y); }, (int,float), Vector2), asCALL_CDECL);
614 engine->RegisterGlobalFunction(
"void ResetMouseDragDelta(int = 0)", asFUNCTIONPR([](
int a) { ImGui::ResetMouseDragDelta(a); }, (int),
void), asCALL_CDECL);
615 engine->RegisterGlobalFunction(
"int GetMouseCursor()", asFUNCTIONPR([]() {
return ImGui::GetMouseCursor(); }, (),
int), asCALL_CDECL);
616 engine->RegisterGlobalFunction(
"void SetMouseCursor(int)", asFUNCTIONPR([](ImGuiMouseCursor a) { ImGui::SetMouseCursor(a); }, (int),
void), asCALL_CDECL);
617 engine->RegisterGlobalFunction(
"void CaptureKeyboardFromApp(bool = true)", asFUNCTIONPR([](
bool a) { ImGui::CaptureKeyboardFromApp(a); }, (bool),
void), asCALL_CDECL);
618 engine->RegisterGlobalFunction(
"void CaptureMouseFromApp(bool = true)", asFUNCTIONPR([](
bool a) { ImGui::CaptureMouseFromApp(a); }, (bool),
void), asCALL_CDECL);
621 engine->RegisterGlobalFunction(
"string GetClipboardText()", asFUNCTIONPR([]() {
return string(ImGui::GetClipboardText()); }, (),
string), asCALL_CDECL);
622 engine->RegisterGlobalFunction(
"void SetClipboardText(const string&in)", asFUNCTIONPR([](
const string& a) { ImGui::SetClipboardText(a.c_str()); }, (
const string&),
void), asCALL_CDECL);
626 engine->RegisterGlobalFunction(
"void PlotLines(const string&in label, array<float>&in values, int values_count, int values_offset = 0, const string&in overlay_text = string(), float scale_min = FLT_MAX, float scale_max = FLT_MAX, vector2 graph_size = vector2(0,0))",
627 asFUNCTIONPR([](
const string& label, CScriptArray* values,
int values_count,
int values_offset,
const string& overlay_text,
float scale_min,
float scale_max, Vector2 graph_size)
628 { ImGui::PlotLines(label.c_str(), &
ImGuiPlotLinesScriptValueGetterFunc, values, values_count, values_offset, overlay_text.c_str(), scale_min, scale_max, ImVec2(graph_size.x, graph_size.y)); },
629 (
const string&, CScriptArray*, int, int,
const string&, float, float, Vector2),
void), asCALL_CDECL);
631 engine->SetDefaultNamespace(
"");