Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2010, 3:37:40 AM (14 years ago)
Author:
landauf
Message:

merged consolecommands3 branch back to trunk.

note: the console command interface has changed completely, but the documentation is not yet up to date. just copy an existing command and change it to your needs, it's pretty self-explanatory. also the include files related to console commands are now located in core/command/. in the game it should work exactly like before, except for some changes in the auto-completion.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/LuaState.h

    r7266 r7284  
    4040#include <loki/ScopeGuard.h>
    4141
    42 #include "Functor.h"
    4342#include "ToluaInterface.h"
    4443
    4544namespace orxonox // tolua_export
    4645{ // tolua_export
    47     class Functor; // tolua_export
     46    class LuaFunctor; // tolua_export
    4847
    49     //! Functor subclass that simply executes code with 0 arguments.
    50     class _CoreExport LuaFunctor : public Functor
     48    //! callback class that executes lua code
     49    class _CoreExport LuaFunctor
    5150    {
    5251        public:
    5352            LuaFunctor(const std::string& code, LuaState* luaState);
    54             void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null);
    55             void evaluateParam(unsigned int index, MultiType& param) const {}
     53            void operator()();
    5654
    5755        private:
     
    9189        const shared_ptr<ResourceInfo>& getDefaultResourceInfo() { return this->sourceFileInfo_; }
    9290
    93         Functor* createLuaFunctor(const std::string& code) { return new LuaFunctor(code, this); } // tolua_export
     91        LuaFunctor* createLuaFunctor(const std::string& code) { return new LuaFunctor(code, this); } // tolua_export
    9492        //! Tells about whether IOConsole was activated. The Lua debugger only works with a normal console.
    9593        bool usingIOConsole() const; // tolua_export
Note: See TracChangeset for help on using the changeset viewer.