Luanti 5.11.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 showLocalFormSpec (const std::string &formspec, const std::string &formname)
 
void showNodeFormspec (const std::string &formspec, const v3s16 &nodepos)
 
void showPlayerInventory ()
 
void showDeathFormspecLegacy ()
 
void showPauseMenu ()
 
void update ()
 
void disableDebugView ()
 
bool handleCallbacks ()
 

Private Member Functions

void deleteFormspec ()
 

Private Attributes

Clientm_client
 
RenderingEnginem_rendering_engine
 
InputHandlerm_input
 
std::string m_formname
 
GUIFormSpecMenum_formspec = nullptr
 

Constructor & Destructor Documentation

◆ ~GameFormSpec()

GameFormSpec::~GameFormSpec ( )

References deleteFormspec(), m_formspec, and GUIModalMenu::quitMenu().

+ Here is the call graph for this function:

Member Function Documentation

◆ deleteFormspec()

void GameFormSpec::deleteFormspec ( )
private

References m_formname, and m_formspec.

Referenced by ~GameFormSpec(), and update().

+ Here is the caller graph for this function:

◆ disableDebugView()

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:

◆ handleCallbacks()

bool GameFormSpec::handleCallbacks ( )

References MainGameCallback::changepassword_requested, MainGameCallback::changevolume_requested, MainGameCallback::disconnect_requested, g_gamecallback, g_menumgr, Client::getTextureSource(), guienv, guiroot, InputHandler::keycache, MainGameCallback::keyconfig_changed, MainGameCallback::keyconfig_requested, m_client, m_input, KeyCache::populate(), 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:

◆ init()

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

References m_client, m_input, and m_rendering_engine.

Referenced by Game::startup().

+ Here is the caller graph for this function:

◆ showDeathFormspecLegacy()

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:

◆ showFormSpec()

void GameFormSpec::showFormSpec ( const std::string & formspec,
const std::string & formname )

References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), Client::getFormspecPrepend(), Client::getSoundManager(), InputHandler::joystick, m_client, m_formname, m_formspec, m_input, m_rendering_engine, and GUIModalMenu::quitMenu().

Referenced by Game::handleClientEvent_ShowFormSpec().

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

◆ showLocalFormSpec()

void GameFormSpec::showLocalFormSpec ( const std::string & formspec,
const std::string & formname )

References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), Client::getFormspecPrepend(), Client::getSoundManager(), InputHandler::joystick, m_client, m_formspec, m_input, and m_rendering_engine.

Referenced by Game::handleClientEvent_ShowLocalFormSpec().

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

◆ showNodeFormspec()

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_formname, 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:

◆ showPauseMenu()

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:

◆ showPlayerInventory()

void GameFormSpec::showPlayerInventory ( )

References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), LocalPlayer::getCAO(), Client::getEnv(), PlayerInventoryFormSource::getForm(), Client::getFormspecPrepend(), Client::getInventory(), ClientEnvironment::getLocalPlayer(), Client::getScript(), Client::getSoundManager(), infostream, InputHandler::joystick, m_client, m_formname, m_formspec, m_input, m_rendering_engine, Client::modsLoaded(), ScriptApiClient::on_inventory_open(), InventoryLocation::setCurrentPlayer(), and GUIFormSpecMenu::setFormSpec().

Referenced by Game::processKeyInput().

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

◆ update()

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:

Member Data Documentation

◆ m_client

◆ m_formname

std::string GameFormSpec::m_formname
private

◆ m_formspec

◆ m_input

◆ m_rendering_engine


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