Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 12, 2009, 7:41:20 PM (15 years ago)
Author:
rgrieder
Message:

Fix for the resource group problem in the GUIManager. This should fix the lua require function (though I could not test it).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/menu/src/libraries/core/GUIManager.cc

    r6048 r6051  
    121121        // setup scripting
    122122        luaState_.reset(new LuaState());
     123        rootFileInfo_ = Resource::getInfo("InitialiseGUI.lua", "GUI");
     124        // This is necessary to ensure that input events also use the right resource info when triggering lua functions
     125        luaState_->setDefaultResourceInfo(this->rootFileInfo_);
    123126        scriptModule_.reset(new LuaScriptModule(luaState_->getInternalLuaState()));
    124127
     
    135138
    136139        // Initialise the basic lua code
    137         rootFileInfo_ = Resource::getInfo("InitialiseGUI.lua", "GUI");
    138140        this->luaState_->doFile("InitialiseGUI.lua", "GUI", false);
    139141
Note: See TracChangeset for help on using the changeset viewer.