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/orxonox/gamestates/GSRoot.cc

    r3304 r3340  
    3434#include "core/Game.h"
    3535#include "core/GameMode.h"
     36#include "core/LuaBind.h"
    3637#include "network/NetworkFunction.h"
     38#include "ToluaBindCore.h"
     39#include "ToluaBindOrxonox.h"
    3740#include "tools/Timer.h"
    3841#include "interfaces/TimeFactorListener.h"
     
    5861        this->ccSetTimeFactor_ = 0;
    5962        this->ccPause_ = 0;
     63
     64        // Tell LuaBind about all tolua interfaces
     65        LuaBind::getInstance().addToluaInterface(&tolua_Core_open, "Core");
     66        LuaBind::getInstance().addToluaInterface(&tolua_Orxonox_open, "Orxonox");
    6067    }
    6168
Note: See TracChangeset for help on using the changeset viewer.