#include <game_formspec.h>
Collaboration diagram for GameFormSpec:Public Member Functions | |
| void | init (Client *client, RenderingEngine *rendering_engine, InputHandler *input) |
| ~GameFormSpec () | |
| void | showFormSpec (const std::string &formspec, const std::string &formname) |
| void | showCSMFormSpec (const std::string &formspec, const std::string &formname) |
| void | showPauseMenuFormSpec (const std::string &formspec, const std::string &formname) |
| void | showNodeFormspec (const std::string &formspec, const v3s16 &nodepos) |
| void | showPlayerInventory (const std::string *fs_override) |
If !fs_override: Uses player->inventory_formspec. | |
| void | showDeathFormspecLegacy () |
| void | showPauseMenu () |
| void | update () |
| void | disableDebugView () |
| bool | handleCallbacks () |
| void | reset () |
Private Member Functions | |
| bool | handleEmptyFormspec (const std::string &formspec, const std::string &formname) |
| void | deleteFormspec () |
Private Attributes | |
| Client * | m_client |
| RenderingEngine * | m_rendering_engine |
| InputHandler * | m_input |
| std::unique_ptr< PauseMenuScripting > | m_pause_script |
| GUIFormSpecMenu * | m_formspec = nullptr |
The currently open formspec that is not a submenu of the pause menu FIXME: Layering is already managed by GUIModalMenu (g_menumgr), hence this variable should be removed in long-term. | |
|
inline |
|
private |
References m_formspec.
Referenced by reset(), and update().
Here is the caller graph for this function:| void GameFormSpec::disableDebugView | ( | ) |
References m_formspec, and GUIFormSpecMenu::setDebugView().
Referenced by Game::updateDebugState().
Here is the call graph for this function:
Here is the caller graph for this function:| bool GameFormSpec::handleCallbacks | ( | ) |
References MainGameCallback::changepassword_requested, MainGameCallback::changevolume_requested, MainGameCallback::disconnect_requested, g_gamecallback, g_menumgr, Client::getTextureSource(), guienv, guiroot, m_client, m_pause_script, ScriptApiPauseMenu::open_settings(), MainGameCallback::settings_requested, MainGameCallback::show_open_url_dialog, and MainGameCallback::touchscreenlayout_requested.
Referenced by Game::run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References g_menumgr, GUIModalMenu::quitMenu(), and MainMenuManager::tryGetTopMenu().
Referenced by showCSMFormSpec(), showFormSpec(), and showPauseMenuFormSpec().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::init | ( | Client * | client, |
| RenderingEngine * | rendering_engine, | ||
| InputHandler * | input ) |
References g_gamecallback, PauseMenuScripting::loadBuiltin(), m_client, m_input, m_pause_script, and m_rendering_engine.
Referenced by Game::startup().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::reset | ( | ) |
References deleteFormspec(), m_formspec, and GUIModalMenu::quitMenu().
Referenced by ~GameFormSpec(), and Game::shutdown().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::showCSMFormSpec | ( | const std::string & | formspec, |
| const std::string & | formname ) |
References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), Client::getFormspecPrepend(), Client::getScript(), Client::getSoundManager(), handleEmptyFormspec(), InputHandler::joystick, m_client, m_formspec, m_input, and m_rendering_engine.
Referenced by Game::handleClientEvent_ShowCSMFormSpec().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::showDeathFormspecLegacy | ( | ) |
References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), Client::getFormspecPrepend(), Client::getSoundManager(), InputHandler::joystick, m_client, m_formspec, m_input, m_rendering_engine, GUIFormSpecMenu::setFocus(), and SIZE_TAG.
Referenced by Game::handleClientEvent_DeathscreenLegacy().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::showFormSpec | ( | const std::string & | formspec, |
| const std::string & | formname ) |
References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), Client::getFormspecPrepend(), Client::getSoundManager(), handleEmptyFormspec(), InputHandler::joystick, m_client, m_formspec, m_input, and m_rendering_engine.
Referenced by Game::handleClientEvent_ShowFormSpec().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::showNodeFormspec | ( | const std::string & | formspec, |
| const v3s16 & | nodepos ) |
References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), ClientEnvironment::getClientMap(), Client::getEnv(), Client::getFormspecPrepend(), Client::getSoundManager(), infostream, InputHandler::joystick, m_client, m_formspec, m_input, m_rendering_engine, GUIFormSpecMenu::setFormSpec(), and InventoryLocation::setNodeMeta().
Referenced by Game::nodePlacement().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::showPauseMenu | ( | ) |
References GUIFormSpecMenu::create(), GUIFormSpecMenu::doPause, g_settings, g_touchcontrols, Settings::get(), RenderingEngine::get_gui_env(), Client::getAddressName(), Settings::getBool(), Client::getFormspecPrepend(), Client::getSoundManager(), InputHandler::joystick, m_client, m_formspec, m_input, m_rendering_engine, Client::m_simple_singleplayer_mode, GUIFormSpecMenu::setFocus(), SIZE_TAG, str_formspec_escape(), and strgettext().
Referenced by Game::processKeyInput(), and Game::run().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::showPauseMenuFormSpec | ( | const std::string & | formspec, |
| const std::string & | formname ) |
References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), Client::getSoundManager(), handleEmptyFormspec(), InputHandler::joystick, m_client, m_input, m_pause_script, and m_rendering_engine.
Referenced by Game::handleClientEvent_ShowPauseMenuFormSpec().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::showPlayerInventory | ( | const std::string * | fs_override | ) |
If !fs_override: Uses player->inventory_formspec.
If fs_override: Uses a temporary formspec until an update is received.
References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), LocalPlayer::getCAO(), Client::getEnv(), Client::getFormspecPrepend(), Client::getInventory(), ClientEnvironment::getLocalPlayer(), Client::getScript(), Client::getSoundManager(), infostream, LocalPlayer::inventory_formspec_override, InputHandler::joystick, m_client, m_formspec, m_input, m_rendering_engine, Client::modsLoaded(), ScriptApiClient::on_inventory_open(), InventoryLocation::setCurrentPlayer(), and GUIFormSpecMenu::setFormSpec().
Referenced by Game::handleClientEvent_ShowFormSpec(), and Game::processKeyInput().
Here is the call graph for this function:
Here is the caller graph for this function:| void GameFormSpec::update | ( | ) |
References deleteFormspec(), ClientEnvironment::getClientMap(), Client::getEnv(), GUIFormSpecMenu::getFormspecLocation(), Map::getNodeMetadata(), SimpleMetadata::getString(), guiroot, isMenuActive(), m_client, m_formspec, InventoryLocation::NODEMETA, and GUIModalMenu::quitMenu().
Referenced by Game::updateFrame().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
|
private |
The currently open formspec that is not a submenu of the pause menu FIXME: Layering is already managed by GUIModalMenu (g_menumgr), hence this variable should be removed in long-term.
Referenced by deleteFormspec(), disableDebugView(), reset(), showCSMFormSpec(), showDeathFormspecLegacy(), showFormSpec(), showNodeFormspec(), showPauseMenu(), showPlayerInventory(), and update().
|
private |
|
private |
Referenced by handleCallbacks(), init(), and showPauseMenuFormSpec().
|
private |