Removed onUnload from corelib and added more lua bindings for resources.

This commit is contained in:
BenDol 2014-04-02 05:20:18 +13:00
parent 166eb7614f
commit 3ce37dacbd
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,4 @@ Module
dofiles 'ui'
dofile 'inputmessage'
dofile 'outputmessage'
@onUnload: |
g_settings = nil
dofile 'outputmessage'

View File

@ -183,6 +183,8 @@ void Application::registerLuaFunctions()
g_lua.bindSingletonFunction("g_resources", "directoryExists", &ResourceManager::directoryExists, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getRealDir", &ResourceManager::getRealDir, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getWorkDir", &ResourceManager::getWorkDir, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getUserDir", &ResourceManager::getUserDir, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getWriteDir", &ResourceManager::getWriteDir, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getSearchPaths", &ResourceManager::getSearchPaths, &g_resources);
g_lua.bindSingletonFunction("g_resources", "listDirectoryFiles", &ResourceManager::listDirectoryFiles, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getDirectoryFiles", &ResourceManager::getDirectoryFiles, &g_resources);
@ -190,6 +192,7 @@ void Application::registerLuaFunctions()
g_lua.bindSingletonFunction("g_resources", "guessFilePath", &ResourceManager::guessFilePath, &g_resources);
g_lua.bindSingletonFunction("g_resources", "isFileType", &ResourceManager::isFileType, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getFileTime", &ResourceManager::getFileTime, &g_resources);
g_lua.bindSingletonFunction("g_resources", "makeDir", &ResourceManager::makeDir, &g_resources);
// Config
g_lua.registerClass<Config>();