From dae66ca39f408835290cd7e25f9d3d100be20b5e Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Mon, 20 Jun 2016 08:01:59 +0300 Subject: [PATCH] Export the function that must be used to obtain unused keybind slots. --- source/Entity/Keybind.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/Entity/Keybind.cpp b/source/Entity/Keybind.cpp index b9af411d..a94cf6e2 100644 --- a/source/Entity/Keybind.cpp +++ b/source/Entity/Keybind.cpp @@ -256,6 +256,12 @@ static Array Keybind_FindActive() return Var< Array >(DefaultVM::Get(), -1).value; } +// ------------------------------------------------------------------------------------------------ +static SQInteger Keybind_UnusedSlot() +{ + return _Func->GetKeyBindUnusedSlot(); +} + // ================================================================================================ void Register_CKeybind(HSQUIRRELVM vm) { @@ -287,6 +293,7 @@ void Register_CKeybind(HSQUIRRELVM vm) .StaticFunc(_SC("FindByID"), &Keybind_FindByID) .StaticFunc(_SC("FindByTag"), &Keybind_FindByTag) .StaticFunc(_SC("FindActive"), &Keybind_FindActive) + .StaticFunc(_SC("UnusedSlot"), &Keybind_UnusedSlot) // Static Overloads .StaticOverload< Object & (*)(Int32, bool, Int32, Int32, Int32) > (_SC("CreateEx"), &Keybind_CreateEx)