#include <game_formspec.h>
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().
| void GameFormSpec::disableDebugView | ( | ) |
References m_formspec.
| bool GameFormSpec::handleCallbacks | ( | ) |
References g_gamecallback, g_menumgr, guienv, guiroot, m_client, and m_pause_script.
|
private |
References g_menumgr, and GUIModalMenu::quitMenu().
Referenced by showCSMFormSpec(), showFormSpec(), and showPauseMenuFormSpec().
| void GameFormSpec::init | ( | Client * | client, |
| RenderingEngine * | rendering_engine, | ||
| InputHandler * | input ) |
References g_gamecallback, m_client, m_input, m_pause_script, and m_rendering_engine.
| void GameFormSpec::reset | ( | ) |
References deleteFormspec(), and m_formspec.
Referenced by ~GameFormSpec().
| void GameFormSpec::showCSMFormSpec | ( | const std::string & | formspec, |
| const std::string & | formname ) |
References GUIFormSpecMenu::create(), handleEmptyFormspec(), m_client, m_formspec, m_input, and m_rendering_engine.
| void GameFormSpec::showDeathFormspecLegacy | ( | ) |
References GUIFormSpecMenu::create(), m_client, m_formspec, m_input, m_rendering_engine, and SIZE_TAG.
| void GameFormSpec::showFormSpec | ( | const std::string & | formspec, |
| const std::string & | formname ) |
References GUIFormSpecMenu::create(), handleEmptyFormspec(), m_client, m_formspec, m_input, and m_rendering_engine.
| void GameFormSpec::showNodeFormspec | ( | const std::string & | formspec, |
| const v3s16 & | nodepos ) |
References GUIFormSpecMenu::create(), infostream, m_client, m_formspec, m_input, m_rendering_engine, and InventoryLocation::setNodeMeta().
| void GameFormSpec::showPauseMenu | ( | ) |
References GUIFormSpecMenu::create(), g_settings, g_touchcontrols, m_client, m_formspec, m_input, m_rendering_engine, SIZE_TAG, str_formspec_escape(), and strgettext().
| void GameFormSpec::showPauseMenuFormSpec | ( | const std::string & | formspec, |
| const std::string & | formname ) |
References GUIFormSpecMenu::create(), handleEmptyFormspec(), m_client, m_input, m_pause_script, and m_rendering_engine.
| 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(), LocalPlayer::getCAO(), infostream, LocalPlayer::inventory_formspec_override, m_client, m_formspec, m_input, m_rendering_engine, and InventoryLocation::setCurrentPlayer().
| void GameFormSpec::update | ( | ) |
References deleteFormspec(), SimpleMetadata::getString(), guiroot, isMenuActive(), m_client, m_formspec, and InventoryLocation::NODEMETA.
|
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 |