Luanti 5.16.0-dev
Loading...
Searching...
No Matches
GameFormSpec Struct Reference

#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

Clientm_client
RenderingEnginem_rendering_engine
InputHandlerm_input
std::unique_ptr< PauseMenuScriptingm_pause_script
GUIFormSpecMenum_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.

Constructor & Destructor Documentation

◆ ~GameFormSpec()

GameFormSpec::~GameFormSpec ( )
inline

References reset().

Here is the call graph for this function:

Member Function Documentation

◆ deleteFormspec()

void GameFormSpec::deleteFormspec ( )
private

References m_formspec.

Referenced by reset(), and update().

Here is the caller graph for this function:

◆ disableDebugView()

void GameFormSpec::disableDebugView ( )

References m_formspec.

◆ handleCallbacks()

bool GameFormSpec::handleCallbacks ( )

◆ handleEmptyFormspec()

bool GameFormSpec::handleEmptyFormspec ( const std::string & formspec,
const std::string & formname )
private

References g_menumgr, and GUIModalMenu::quitMenu().

Referenced by showCSMFormSpec(), showFormSpec(), and showPauseMenuFormSpec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void GameFormSpec::init ( Client * client,
RenderingEngine * rendering_engine,
InputHandler * input )

◆ reset()

void GameFormSpec::reset ( )

References deleteFormspec(), and m_formspec.

Referenced by ~GameFormSpec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showCSMFormSpec()

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.

Here is the call graph for this function:

◆ showDeathFormspecLegacy()

void GameFormSpec::showDeathFormspecLegacy ( )

References GUIFormSpecMenu::create(), m_client, m_formspec, m_input, m_rendering_engine, and SIZE_TAG.

Here is the call graph for this function:

◆ showFormSpec()

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.

Here is the call graph for this function:

◆ showNodeFormspec()

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().

Here is the call graph for this function:

◆ showPauseMenu()

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().

Here is the call graph for this function:

◆ showPauseMenuFormSpec()

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.

Here is the call graph for this function:

◆ showPlayerInventory()

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().

Here is the call graph for this function:

◆ update()

void GameFormSpec::update ( )

References deleteFormspec(), SimpleMetadata::getString(), guiroot, isMenuActive(), m_client, m_formspec, and InventoryLocation::NODEMETA.

Here is the call graph for this function:

Member Data Documentation

◆ m_client

◆ m_formspec

GUIFormSpecMenu* GameFormSpec::m_formspec = nullptr
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().

◆ m_input

◆ m_pause_script

std::unique_ptr<PauseMenuScripting> GameFormSpec::m_pause_script
private

◆ m_rendering_engine


The documentation for this struct was generated from the following files: