* dl shell 批量小写文件名
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "ui/dl_ui_manager.h"
|
||||
|
||||
#include <LuaBridge/Array.h>
|
||||
#include <LuaBridge/Vector.h>
|
||||
|
||||
namespace dl
|
||||
{
|
||||
@@ -37,7 +38,19 @@ namespace dl
|
||||
.endClass();
|
||||
|
||||
auto result = luabridge::push(L, g_system);
|
||||
lua_setglobal(L, "system");
|
||||
lua_setglobal(L, "g_system");
|
||||
}
|
||||
|
||||
void lua_register_file(lua_State* L)
|
||||
{
|
||||
using namespace File::Lua;
|
||||
luabridge::getGlobalNamespace(L)
|
||||
.beginNamespace("g_file")
|
||||
.addFunction("GetPathFileAll", &lua_GetPathFileAll_3, &lua_GetPathFileAll_2, &lua_GetPathFileAll_1)
|
||||
.addFunction("Rename", &File::Rename)
|
||||
.addFunction("GetFilePath", &File::GetFilePath)
|
||||
.addFunction("GetFileName", &File::GetFileName)
|
||||
.endNamespace();
|
||||
}
|
||||
|
||||
void lua_register_gfx(lua_State* L)
|
||||
@@ -48,7 +61,7 @@ namespace dl
|
||||
.endClass();
|
||||
|
||||
auto result = luabridge::push(L, g_gfx);
|
||||
lua_setglobal(L, "gfx");
|
||||
lua_setglobal(L, "g_gfx");
|
||||
}
|
||||
|
||||
void lua_register_ui(lua_State* L)
|
||||
@@ -73,7 +86,7 @@ namespace dl
|
||||
.endClass();
|
||||
|
||||
auto result = luabridge::push(L, g_ui);
|
||||
lua_setglobal(L, "ui");
|
||||
lua_setglobal(L, "g_ui");
|
||||
}
|
||||
|
||||
void lua_register_factory(lua_State* L)
|
||||
@@ -84,7 +97,7 @@ namespace dl
|
||||
.endClass();
|
||||
|
||||
auto result = luabridge::push(L, g_factory);
|
||||
lua_setglobal(L, "factory");*/
|
||||
lua_setglobal(L, "g_factory");*/
|
||||
}
|
||||
|
||||
#if DL_PLATFORM == DL_PLATFORM_WIN32
|
||||
@@ -102,6 +115,7 @@ namespace dl
|
||||
{
|
||||
lua_register_base(L);
|
||||
lua_register_system(L);
|
||||
lua_register_file(L);
|
||||
lua_register_gfx(L);
|
||||
lua_register_ui(L);
|
||||
lua_register_factory(L);
|
||||
|
||||
Reference in New Issue
Block a user