diff options
author | chai <chaifix@163.com> | 2021-10-18 19:56:41 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-18 19:56:41 +0800 |
commit | 45328cbadd8a946c19a77301f218efbf650e2f28 (patch) | |
tree | 8ec4f3a9737b2cbb9744f8347a56783743be2a4c /Runtime/Lua/LuaHelper.cpp | |
parent | b5702ece4c2cf751c252e76fb885a7ec41ccabe8 (diff) |
*misc
Diffstat (limited to 'Runtime/Lua/LuaHelper.cpp')
-rw-r--r-- | Runtime/Lua/LuaHelper.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Runtime/Lua/LuaHelper.cpp b/Runtime/Lua/LuaHelper.cpp new file mode 100644 index 0000000..289f0f6 --- /dev/null +++ b/Runtime/Lua/LuaHelper.cpp @@ -0,0 +1,23 @@ +#include "LuaHelper.h"
+
+using namespace LuaBind;
+
+template <> +Rectf State::GetValue < Rectf >(int idx, const Rectf value)
+{
+ Rectf rect;
+ rect.x = GetField<float>(idx, 1, 0); + rect.y = GetField<float>(idx, 2, 0); + rect.width = GetField<float>(idx, 3, 0); + rect.height = GetField<float>(idx, 4, 0); + return rect;
+}
+
+template <> +Vector2f State::GetValue < Vector2f >(int idx, const Vector2f value)
+{
+ Vector2f v2; + v2.x = GetField<float>(idx, 1, 0); + v2.y = GetField<float>(idx, 2, 0); + return v2;
+}
|