Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2009, 12:43:12 PM (14 years ago)
Author:
rgrieder
Message:

Added LuaFunctor that can execute arbitrary lua code.
Also added LuaState::createLuaFunctor(std::string) and implemented that for the keybindings menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/LuaState.cc

    r6190 r6281  
    263263        }
    264264    }
     265
     266
     267    LuaFunctor::LuaFunctor(const std::string& code, LuaState* luaState)
     268    {
     269        this->code_ = code;
     270        this->lua_ = luaState;
     271    }
     272
     273    void LuaFunctor::operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5)
     274    {
     275        lua_->doString(this->code_);
     276    }
    265277}
Note: See TracChangeset for help on using the changeset viewer.