Skip to content

Commit

Permalink
client: add setMinimapComponentPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
zziger committed Jul 21, 2023
1 parent 15519c7 commit 5cd2a35
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions client/src/bindings/ClientBindingsMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,16 @@ static void SetMinimapComponentPosition(const v8::FunctionCallbackInfo<v8::Value
alt::ICore::Instance().SetMinimapComponentPosition(name, alignX[0], alignY[0], pos, size);
}

static void ResetMinimapComponentPosition(const v8::FunctionCallbackInfo<v8::Value>& info)
{
V8_GET_ISOLATE_CONTEXT();
V8_CHECK_ARGS_LEN(1);

V8_ARG_TO_STRING(1, name);

alt::ICore::Instance().ResetMinimapComponentPosition(name);
}

static void SetMinimapIsRectangle(const v8::FunctionCallbackInfo<v8::Value>& info)
{
V8_GET_ISOLATE_CONTEXT();
Expand Down Expand Up @@ -1307,6 +1317,7 @@ extern V8Module altModule("alt",
V8Helpers::RegisterFunc(exports, "getScreenResolution", &GetScreenResolution);

V8Helpers::RegisterFunc(exports, "setMinimapComponentPosition", &SetMinimapComponentPosition);
V8Helpers::RegisterFunc(exports, "resetMinimapComponentPosition", &ResetMinimapComponentPosition);
V8Helpers::RegisterFunc(exports, "setMinimapIsRectangle", &SetMinimapIsRectangle);

V8Helpers::RegisterFunc(exports, "loadDefaultIpls", &LoadDefaultIpls);
Expand Down
2 changes: 1 addition & 1 deletion shared/deps/cpp-sdk
Submodule cpp-sdk updated 1 files
+1 −0 ICore.h

0 comments on commit 5cd2a35

Please sign in to comment.