Raygui lib examples file browser.
This commit is contained in:
13
src/core.c
13
src/core.c
@@ -843,7 +843,7 @@ int lcoreEndScissorMode( lua_State* L ) {
|
||||
*/
|
||||
|
||||
/*
|
||||
> shader = RL.LoadShader( string vsFileName, string fsFileName )
|
||||
> shader = RL.LoadShader( string|nil vsFileName, string|nil fsFileName )
|
||||
|
||||
Load shader from files and bind default locations.
|
||||
NOTE: Set nil if no shader
|
||||
@@ -867,7 +867,7 @@ int lcoreLoadShader( lua_State* L ) {
|
||||
}
|
||||
|
||||
/*
|
||||
> shader = RL.LoadShaderFromMemory( string vsCode, string fsCode )
|
||||
> shader = RL.LoadShaderFromMemory( string|nil vsCode, string|nil fsCode )
|
||||
|
||||
Load shader from code strings and bind default locations
|
||||
NOTE: Set nil if no shader
|
||||
@@ -1761,7 +1761,7 @@ int lcoreLoadDirectoryFiles( lua_State* L ) {
|
||||
}
|
||||
|
||||
/*
|
||||
> fileNames = RL.LoadDirectoryFilesEx( string basePath, string filter, bool scanSubdirs )
|
||||
> fileNames = RL.LoadDirectoryFilesEx( string basePath, string|nil filter, bool scanSubdirs )
|
||||
|
||||
Load directory filepaths with extension filtering and recursive directory scan
|
||||
|
||||
@@ -1769,8 +1769,13 @@ Load directory filepaths with extension filtering and recursive directory scan
|
||||
*/
|
||||
int lcoreLoadDirectoryFilesEx( lua_State* L ) {
|
||||
bool scanSubdirs = uluaGetBoolean( L, 3 );
|
||||
const char* basePath = luaL_checkstring( L, 1 );
|
||||
char* filter = NULL;
|
||||
|
||||
FilePathList files = LoadDirectoryFilesEx( luaL_checkstring( L, 1 ), luaL_checkstring( L, 2 ), scanSubdirs );
|
||||
if ( lua_isstring( L, 2 ) ) {
|
||||
filter = (char*)lua_tostring( L, 2 );
|
||||
}
|
||||
FilePathList files = LoadDirectoryFilesEx( basePath, filter, scanSubdirs );
|
||||
|
||||
lua_createtable( L, files.count, 0 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user