diff options
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;
+}
|