From 700a9aadb7408843936c6cc7f5f47b48ddb37153 Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 13 Dec 2021 14:44:35 +0100 Subject: [PATCH] Add command to switch small/full map --- .../src/interface_v3/action_handler_game.cpp | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/ryzom/client/src/interface_v3/action_handler_game.cpp b/ryzom/client/src/interface_v3/action_handler_game.cpp index f05ffb271..06a97671d 100644 --- a/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -1095,6 +1095,20 @@ public: REGISTER_ACTION_HANDLER( CHandlerContextWebPage, "context_web_page"); +// *************************************************************************** +class CHandlerFullMap : public IActionHandler +{ +public: + void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) + { + CInterfaceManager *pIM= CInterfaceManager::getInstance(); + + CLuaManager::getInstance().executeLuaScript("game:openFullMap()", true); + } +}; +REGISTER_ACTION_HANDLER( CHandlerFullMap, "fullmap"); + + // *************************************************************************** @@ -1958,7 +1972,7 @@ public: bool womanTitle = false; if (pChar != NULL) womanTitle = pChar->getGender() == GSGENDER::female; - + copyInout = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(copyInout), womanTitle); // Sometimes translation contains another title @@ -2665,9 +2679,9 @@ class CAHAddShape : public IActionHandler instance.setPos(CVector((float)x, (float)y, (float)z)); instance.setRotQuat(dir.getRot()); } - + instance.setTransformMode(UTransformable::RotEuler); - + // if the shape is a particle system, additionnal parameters are user params UParticleSystemInstance psi; psi.cast (instance); @@ -3402,7 +3416,7 @@ class CHandlerGameConfigVREnable : public IActionHandler // VR_CONFIG CCtrlBaseButton *pBut = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GAME_CONFIG_VR_ENABLE_BUTTON)); - if (pBut) + if (pBut) { // hide or show device list depending on enabled or not updateVRDevicesComboUI(pBut->getPushed()); @@ -3541,7 +3555,7 @@ class CHandlerGameConfigApply : public IActionHandler NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:AUTO_CHANNEL")->setValue32(pCS->getPushed()); CCtrlBaseButton *pBut = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(GAME_CONFIG_VR_ENABLE_BUTTON)); - if (pBut) + if (pBut) { // store the new config variables ClientCfg.VREnable = pBut->getPushed();