Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 23, 2009, 8:47:55 PM (15 years ago)
Author:
rgrieder
Message:

Generalised use of tolua interfaces a bit: GSRoot now adds the interface functions to LuaBind which supports two new functions: openToluaInterfaces and closeToluaInterfaces. Both accept a lua state and can therefore be used to inject our own tolua bindings (the GUIManager makes use of that).
There's also something new: When loading a level, you could now use the tolua bindings from Orxonox as well (not just those from Core).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/core/LuaBind.h

    r3196 r3340  
    5858    public:
    5959      LuaBind();
    60       inline ~LuaBind() { assert(singletonRef_s); LuaBind::singletonRef_s = NULL; };
     60      ~LuaBind();
    6161
    6262      inline static LuaBind& getInstance() { assert(singletonRef_s); return *LuaBind::singletonRef_s; } // tolua_export
     
    8383        { this->includePath_ = includepath; }
    8484
     85    void addToluaInterface(int (*function)(lua_State*), const std::string& name);
     86    void openToluaInterfaces(lua_State* state);
     87    void closeToluaInterfaces(lua_State* state);
     88
    8589    private:
    8690      static LuaBind* singletonRef_s;
     
    9195      bool isRunning_;
    9296      std::string includePath_;
     97      std::vector<std::pair<std::string, int (*)(lua_State *L)> > toluaInterfaces_;
    9398
    9499  }; // tolua_export
Note: See TracChangeset for help on using the changeset viewer.