mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add texture pack selection to main menu
This commit is contained in:
parent
fe1fe1b1e4
commit
383153419b
10 changed files with 125 additions and 17 deletions
|
@ -82,6 +82,7 @@ void guiLuaApi::initialize(lua_State* L,GUIEngine* engine)
|
|||
retval &= API_FCT(set_topleft_text);
|
||||
retval &= API_FCT(get_modpath);
|
||||
retval &= API_FCT(get_gamepath);
|
||||
retval &= API_FCT(get_texturepath);
|
||||
retval &= API_FCT(get_dirlist);
|
||||
retval &= API_FCT(create_dir);
|
||||
retval &= API_FCT(delete_dir);
|
||||
|
@ -829,6 +830,15 @@ int guiLuaApi::l_get_gamepath(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
int guiLuaApi::l_get_texturepath(lua_State *L)
|
||||
{
|
||||
std::string gamepath
|
||||
= fs::RemoveRelativePathComponents(porting::path_user + DIR_DELIM + "textures");
|
||||
lua_pushstring(L, gamepath.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
int guiLuaApi::l_get_dirlist(lua_State *L) {
|
||||
const char *path = luaL_checkstring(L, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue