Implementation of lua api support for mainmenu. More...
#include <l_mainmenu.h>
Static Public Member Functions | |
static void | Initialize (lua_State *L, int top) |
initialize this API module | |
static void | InitializeAsync (lua_State *L, int top) |
Static Public Member Functions inherited from ModApiBase | |
static ScriptApiBase * | getScriptApiBase (lua_State *L) |
static Server * | getServer (lua_State *L) |
static ServerInventoryManager * | getServerInventoryMgr (lua_State *L) |
static EmergeThread * | getEmergeThread (lua_State *L) |
static IGameDef * | getGameDef (lua_State *L) |
static Environment * | getEnv (lua_State *L) |
static std::string | getCurrentModPath (lua_State *L) |
template<typename T > | |
static T * | getScriptApi (lua_State *L) |
static bool | registerFunction (lua_State *L, const char *name, lua_CFunction func, int top) |
static void | registerClass (lua_State *L, const char *name, const luaL_Reg *methods, const luaL_Reg *metamethods) |
template<typename T > | |
static T * | checkObject (lua_State *L, int narg) |
static int | l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func) |
A wrapper for deprecated functions. | |
Static Private Member Functions | |
static std::string | getTextData (lua_State *L, const std::string &name) |
read a text variable from gamedata table within lua stack | |
static int | getIntegerData (lua_State *L, const std::string &name, bool &valid) |
read an integer variable from gamedata table within lua stack | |
static int | getBoolData (lua_State *L, const std::string &name, bool &valid) |
read a bool variable from gamedata table within lua stack | |
static int | l_start (lua_State *L) |
static int | l_close (lua_State *L) |
static int | l_create_world (lua_State *L) |
static int | l_delete_world (lua_State *L) |
static int | l_get_worlds (lua_State *L) |
static int | l_get_mapgen_names (lua_State *L) |
static int | l_get_language (lua_State *L) |
static int | l_gettext (lua_State *L) |
static int | l_get_games (lua_State *L) |
static int | l_get_content_info (lua_State *L) |
static int | l_check_mod_configuration (lua_State *L) |
static int | l_get_content_translation (lua_State *L) |
static int | l_show_keys_menu (lua_State *L) |
static int | l_show_touchscreen_layout (lua_State *L) |
static int | l_show_path_select_dialog (lua_State *L) |
static int | l_set_topleft_text (lua_State *L) |
static int | l_set_clouds (lua_State *L) |
static int | l_get_textlist_index (lua_State *L) |
static int | l_get_table_index (lua_State *L) |
static int | l_set_background (lua_State *L) |
static int | l_update_formspec (lua_State *L) |
static int | l_set_formspec_prepend (lua_State *L) |
static int | l_get_window_info (lua_State *L) |
static int | l_get_active_driver (lua_State *L) |
static int | l_get_active_renderer (lua_State *L) |
static int | l_get_active_irrlicht_device (lua_State *L) |
static int | l_irrlicht_device_supports_touch (lua_State *L) |
static int | l_get_mainmenu_path (lua_State *L) |
static int | l_get_user_path (lua_State *L) |
static int | l_get_modpath (lua_State *L) |
static int | l_get_modpaths (lua_State *L) |
static int | l_get_clientmodpath (lua_State *L) |
static int | l_get_gamepath (lua_State *L) |
static int | l_get_texturepath (lua_State *L) |
static int | l_get_texturepath_share (lua_State *L) |
static int | l_get_cache_path (lua_State *L) |
static int | l_get_temp_path (lua_State *L) |
static int | l_create_dir (lua_State *L) |
static int | l_delete_dir (lua_State *L) |
static int | l_copy_dir (lua_State *L) |
static int | l_is_dir (lua_State *L) |
static int | l_extract_zip (lua_State *L) |
static int | l_may_modify_path (lua_State *L) |
static int | l_download_file (lua_State *L) |
static int | l_get_video_drivers (lua_State *L) |
static int | l_get_min_supp_proto (lua_State *L) |
static int | l_get_max_supp_proto (lua_State *L) |
static int | l_get_formspec_version (lua_State *L) |
static int | l_open_url (lua_State *L) |
static int | l_open_url_dialog (lua_State *L) |
static int | l_open_dir (lua_State *L) |
static int | l_share_file (lua_State *L) |
static int | l_do_async_callback (lua_State *L) |
Additional Inherited Members | |
Protected Member Functions inherited from LuaHelper | |
template<> | |
bool | readParam (lua_State *L, int index) |
template<> | |
s16 | readParam (lua_State *L, int index) |
template<> | |
int | readParam (lua_State *L, int index) |
template<> | |
float | readParam (lua_State *L, int index) |
template<> | |
v2s16 | readParam (lua_State *L, int index) |
template<> | |
v2f | readParam (lua_State *L, int index) |
template<> | |
v3f | readParam (lua_State *L, int index) |
template<> | |
std::string_view | readParam (lua_State *L, int index) |
template<> | |
std::string | readParam (lua_State *L, int index) |
template<> | |
std::string_view | readParam (lua_State *L, int index) |
Read a string from Lua state L at index without copying it. | |
Static Protected Member Functions inherited from LuaHelper | |
template<typename T > | |
static T | readParam (lua_State *L, int index) |
Read a value using a template type T from Lua state L at index. | |
template<typename T > | |
static T | readParam (lua_State *L, int index, const T &default_value) |
Read a value using a template type T from Lua state L at index. | |
Implementation of lua api support for mainmenu.
|
staticprivate |
read a bool variable from gamedata table within lua stack
L | stack to read variable from |
name | name of variable to read |
References LuaHelper::readParam().
Referenced by l_start().
|
staticprivate |
read an integer variable from gamedata table within lua stack
L | stack to read variable from |
name | name of variable to read |
Referenced by l_start().
|
staticprivate |
read a text variable from gamedata table within lua stack
L | stack to read variable from |
name | name of variable to read |
Referenced by l_start().
|
static |
initialize this API module
L | lua stack to initialize |
top | index (in lua stack) of global API table |
References API_FCT.
Referenced by MainMenuScripting::initializeModApi().
|
static |
References API_FCT.
Referenced by MainMenuScripting::initializeModApi().
|
staticprivate |
References ModConfiguration::addGameMods(), ModConfiguration::addMods(), ModConfiguration::addModsInPath(), CHECK_SECURE_PATH, ModConfiguration::checkConflictsAndDeps(), DIR_DELIM, errorstream, findWorldSubgame(), fs::GetFilenameFromPath(), ModConfiguration::getMods(), ModConfiguration::getUnsatisfiedMods(), ModConfiguration::isConsistent(), ModSpec::name, parseModContents(), ModSpec::path, push_mod_spec(), ModSpec::virtual_path, and BaseException::what().
|
staticprivate |
References GUIEngine::m_kill, and sanity_check.
|
staticprivate |
References CHECK_SECURE_PATH, fs::CopyDir(), fs::MoveDir(), and LuaHelper::readParam().
|
staticprivate |
|
staticprivate |
References DIR_DELIM, Settings::existsLocal(), g_settings, Settings::get(), getAvailableGames(), loadGameConfAndInitWorld(), porting::path_user, Settings::remove(), sanitizeDirName(), Settings::set(), and BaseException::what().
|
staticprivate |
|
staticprivate |
References getAvailableWorlds(), WorldSpec::path, and fs::RecursiveDelete().
|
staticprivate |
References call_string_dump(), ModApiBase::getScriptApi(), and MainMenuScripting::queueAsync().
|
staticprivate |
References CHECK_SECURE_PATH, and GUIEngine::downloadFile().
|
staticprivate |
References CHECK_SECURE_PATH, and RenderingEngine::get_raw_device().
|
staticprivate |
References RenderingEngine::get_video_driver(), and RenderingEngine::getVideoDriverInfo().
|
staticprivate |
|
staticprivate |
|
staticprivate |
References porting::path_cache, and fs::RemoveRelativePathComponents().
|
staticprivate |
References DIR_DELIM, porting::path_user, and fs::RemoveRelativePathComponents().
|
staticprivate |
References ContentSpec::author, CHECK_SECURE_PATH, ModSpec::depends, ContentSpec::desc, ContentSpec::name, ModSpec::optdepends, parseContentInfo(), parseModContents(), ContentSpec::path, ModSpec::path, ContentSpec::release, ContentSpec::textdomain, ContentSpec::title, and ContentSpec::type.
|
staticprivate |
References GUIEngine::getContentTranslations(), sanity_check, translate_string(), utf8_to_wide(), and wide_to_utf8().
|
staticprivate |
References FORMSPEC_API_VERSION.
|
staticprivate |
References DIR_DELIM, porting::path_user, and fs::RemoveRelativePathComponents().
|
staticprivate |
References DIR_DELIM, getAvailableGames(), and getImagePath().
|
staticprivate |
|
staticprivate |
|
staticprivate |
References Mapgen::getMapgenNames(), and LuaHelper::readParam().
|
staticprivate |
References LATEST_PROTOCOL_VERSION.
|
staticprivate |
References CLIENT_PROTOCOL_VERSION_MIN.
|
staticprivate |
References DIR_DELIM, porting::path_user, and fs::RemoveRelativePathComponents().
Referenced by l_get_modpaths().
|
staticprivate |
References fs::AbsolutePath(), DIR_DELIM, getEnvModPaths(), l_get_modpath(), porting::path_share, porting::path_user, and fs::RemoveRelativePathComponents().
|
staticprivate |
References GUIEngine::m_menu, sanity_check, and table.
Referenced by l_get_textlist_index().
|
staticprivate |
|
staticprivate |
|
staticprivate |
References DIR_DELIM, porting::path_user, and fs::RemoveRelativePathComponents().
|
staticprivate |
References DIR_DELIM, porting::path_share, and fs::RemoveRelativePathComponents().
|
staticprivate |
References porting::path_user, and fs::RemoveRelativePathComponents().
|
staticprivate |
References RenderingEngine::getSupportedVideoDrivers(), and RenderingEngine::getVideoDriverInfo().
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
References CHECK_SECURE_PATH, and porting::open_directory().
|
staticprivate |
|
staticprivate |
References RenderingEngine::get_gui_env(), GUIEngine::m_menumanager, GUIEngine::m_parent, GUIEngine::m_rendering_engine, GUIEngine::m_texture_source, and sanity_check.
|
staticprivate |
References minsize(), LuaHelper::readParam(), sanity_check, GUIEngine::setTexture(), TEX_LAYER_BACKGROUND, TEX_LAYER_FOOTER, TEX_LAYER_HEADER, and TEX_LAYER_OVERLAY.
|
staticprivate |
References GUIEngine::m_clouds_enabled, LuaHelper::readParam(), and sanity_check.
|
staticprivate |
References GUIEngine::m_startgame, sanity_check, and GUIEngine::setFormspecPrepend().
|
staticprivate |
|
staticprivate |
References CHECK_SECURE_PATH, and porting::shareFileAndroid().
|
staticprivate |
References RenderingEngine::get_gui_env(), GUIEngine::m_menumanager, GUIEngine::m_parent, GUIEngine::m_rendering_engine, GUIEngine::m_texture_source, and sanity_check.
|
staticprivate |
References RenderingEngine::get_gui_env(), GUIEngine::m_buttonhandler, GUIEngine::m_menumanager, GUIEngine::m_parent, GUIEngine::m_rendering_engine, LuaHelper::readParam(), sanity_check, and GUIFileSelectMenu::setTextDest().
|
staticprivate |
References RenderingEngine::get_gui_env(), GUIEngine::m_menumanager, GUIEngine::m_parent, GUIEngine::m_rendering_engine, GUIEngine::m_texture_source, and sanity_check.
|
staticprivate |
References MainMenuData::address, MainMenuData::allow_login_or_register, Any, MainMenuData::do_reconnect, getBoolData(), getIntegerData(), getTextData(), Login, GUIEngine::m_data, GUIEngine::m_startgame, MainMenuData::name, MainMenuData::password, MainMenuData::port, Register, sanity_check, MainMenuData::selected_world, MainMenuData::serverdescription, MainMenuData::servername, and MainMenuData::simple_singleplayer_mode.
|
staticprivate |
References GUIEngine::m_formspecgui, GUIEngine::m_startgame, sanity_check, and FormspecFormSource::setForm().