Skip to content

Commit

Permalink
👼Script: ImGui::SetNextWindowPos() - added params flags & pivot.
Browse files Browse the repository at this point in the history
  • Loading branch information
ohlidalp committed Nov 28, 2024
1 parent 4848f49 commit 43cca19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/main/scripting/bindings/ImGuiAngelscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ void RoR::RegisterImGuiBindings(AngelScript::asIScriptEngine* engine)
// engine->RegisterGlobalFunction("bool IsWindowAppearing()", asFUNCTIONPR(ImGui::IsWindowAppearing, (), bool), asCALL_CDECL);
engine->RegisterGlobalFunction("void SetWindowFontScale(float)", asFUNCTIONPR(ImGui::SetWindowFontScale, (float), void), asCALL_CDECL);

engine->RegisterGlobalFunction("void SetNextWindowPos(vector2)", asFUNCTIONPR([](Vector2 v) {
ImGui::SetNextWindowPos(ImVec2(v.x, v.y)); }, (Vector2), void), asCALL_CDECL);
engine->RegisterGlobalFunction("void SetNextWindowPos(vector2, int=0, vector2=vector2(0,0))", asFUNCTIONPR([](Vector2 v, int flags, Vector2 pivot) {
ImGui::SetNextWindowPos(ImVec2(v.x, v.y), flags, ImVec2(pivot.x, pivot.y)); }, (Vector2, int, Vector2), void), asCALL_CDECL);
engine->RegisterGlobalFunction("void SetNextWindowSize(vector2)", asFUNCTIONPR([](Vector2 v) {
ImGui::SetNextWindowSize(ImVec2(v.x, v.y)); }, (Vector2), void), asCALL_CDECL);
engine->RegisterGlobalFunction("void SetNextWindowContentSize(vector2)", asFUNCTIONPR([](Vector2 v) {
Expand Down

0 comments on commit 43cca19

Please sign in to comment.