summaryrefslogtreecommitdiff
path: root/src/cat/LegacyLuaAPI.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-01-08 02:05:58 (GMT)
committer jacob1 <jfu614@gmail.com>2013-01-08 02:05:58 (GMT)
commit158b05402348f6eae3ed08f40676c1b8adf0b268 (patch)
tree2810c368e25d27ccf5e086935073ba501332e938 /src/cat/LegacyLuaAPI.cpp
parent986173af4c1aec6308ea6f6f2e126b65eeaf37a3 (diff)
downloadpowder-158b05402348f6eae3ed08f40676c1b8adf0b268.zip
powder-158b05402348f6eae3ed08f40676c1b8adf0b268.tar.gz
fix tpt.selectedl/r/a, but it returns the string identifier now instead of an id
Diffstat (limited to 'src/cat/LegacyLuaAPI.cpp')
-rw-r--r--src/cat/LegacyLuaAPI.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cat/LegacyLuaAPI.cpp b/src/cat/LegacyLuaAPI.cpp
index 80a7f82..90baaa2 100644
--- a/src/cat/LegacyLuaAPI.cpp
+++ b/src/cat/LegacyLuaAPI.cpp
@@ -535,18 +535,20 @@ int luacon_mouseevent(int mx, int my, int mb, int event, int mouse_wheel){
return mpcontinue;
}
-int luacon_step(int mx, int my, int selectl, int selectr, int bsx, int bsy){
+int luacon_step(int mx, int my, std::string selectl, std::string selectr, std::string selectalt, int bsx, int bsy){
int tempret = 0, tempb, i, callret;
lua_pushinteger(luacon_ci->l, bsy);
lua_pushinteger(luacon_ci->l, bsx);
- lua_pushinteger(luacon_ci->l, selectr);
- lua_pushinteger(luacon_ci->l, selectl);
+ lua_pushstring(luacon_ci->l, selectalt.c_str());
+ lua_pushstring(luacon_ci->l, selectr.c_str());
+ lua_pushstring(luacon_ci->l, selectl.c_str());
lua_pushinteger(luacon_ci->l, my);
lua_pushinteger(luacon_ci->l, mx);
lua_setfield(luacon_ci->l, tptProperties, "mousex");
lua_setfield(luacon_ci->l, tptProperties, "mousey");
lua_setfield(luacon_ci->l, tptProperties, "selectedl");
lua_setfield(luacon_ci->l, tptProperties, "selectedr");
+ lua_setfield(luacon_ci->l, tptProperties, "selecteda");
lua_setfield(luacon_ci->l, tptProperties, "brushx");
lua_setfield(luacon_ci->l, tptProperties, "brushy");
for(i = 0; i<6; i++){