From c58e10f1734856f405c31a0cf942099292a8a0f1 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 21 Apr 2015 18:54:08 +0300 Subject: [PATCH] Add "select_shortcut_bar_2" action handler (issue 222) --HG-- branch : develop --- .../data/gamedev/interfaces_v3/actions.xml | 14 ++++++++++++++ .../src/interface_v3/action_handler_phrase.cpp | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml b/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml index 3486e0298..8696de32a 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/actions.xml @@ -205,6 +205,20 @@ + + + + + + + + + + + + + + diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index 67f798cb8..81fa09ef0 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -1620,6 +1620,23 @@ public: }; REGISTER_ACTION_HANDLER(CHandlerPhraseSelectShortcutBar, "select_shortcut_bar"); +// *************************************************************************** +class CHandlerPhraseSelectShortcutBar2 : public IActionHandler +{ +public: + virtual void execute(CCtrlBase * /* pCaller */, const string &Params) + { + CInterfaceManager *pIM= CInterfaceManager::getInstance(); + CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:PHRASE:SELECT_MEMORY_2", false); + if(node) + { + sint32 val; + fromString(Params, val); + node->setValue32(val); + } + } +}; +REGISTER_ACTION_HANDLER(CHandlerPhraseSelectShortcutBar2, "select_shortcut_bar_2"); // *************************************************************************** // ***************************************************************************