diff options
Diffstat (limited to 'src/cat')
| -rw-r--r-- | src/cat/LuaScriptInterface.cpp | 8 | ||||
| -rw-r--r-- | src/cat/LuaScriptInterface.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 57ed1d9..7b98fa3 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -543,6 +543,8 @@ int luacon_element_getproperty(char * key, int * format, unsigned int * modified if (strcmp(key, "name")==0){ offset = offsetof(Element, Name); *format = 2; + if(modified_stuff) + *modified_stuff |= LUACON_EL_MODIFIED_MENUS; } else if (strcmp(key, "color")==0){ offset = offsetof(Element, Colour); @@ -651,6 +653,8 @@ int luacon_element_getproperty(char * key, int * format, unsigned int * modified else if (strcmp(key, "description")==0){ offset = offsetof(Element, Description); *format = 2; + if(modified_stuff) + *modified_stuff |= LUACON_EL_MODIFIED_MENUS; } else { return -1; @@ -761,8 +765,8 @@ int luacon_elementwrite(lua_State* l){ } if (modified_stuff) { - //if (modified_stuff & LUACON_EL_MODIFIED_MENUS) - //luacon_model->notifyMenuListChanged(); + if (modified_stuff & LUACON_EL_MODIFIED_MENUS) + luacon_model->BuildMenus(); if (modified_stuff & LUACON_EL_MODIFIED_CANMOVE) luacon_sim->init_can_move(); if (modified_stuff & LUACON_EL_MODIFIED_GRAPHICS) diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h index 4015109..3d6f0b9 100644 --- a/src/cat/LuaScriptInterface.h +++ b/src/cat/LuaScriptInterface.h @@ -16,7 +16,7 @@ extern "C" } #include "CommandInterface.h" -#include "simulation/Simulation.h"; +#include "simulation/Simulation.h" //Because lua only has bindings for C, we're going to have to go outside "outside" the LuaScriptInterface, this means we can only have one instance :( |
