From 0c8698d7f0cbd4d5d4e608b561708226038c0851 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 29 Jun 2012 02:57:29 +0200 Subject: [PATCH] CHANGED: #1471 CDBGroupComboBox is now part of the NELGUI library and is under the NLGUI namespace. --- code/nel/include/nel/gui/dbgroup_combo_box.h | 162 +++++ code/nel/include/nel/gui/dbview_quantity.h | 2 + code/nel/src/gui/dbgroup_combo_box.cpp | 622 ++++++++++++++++++ code/nel/src/gui/dbview_quantity.cpp | 4 + code/nel/src/gui/link_hack.cpp | 2 + code/ryzom/client/src/connection.cpp | 2 +- .../src/interface_v3/action_handler_game.cpp | 2 +- .../src/interface_v3/action_handler_help.cpp | 2 +- .../bot_chat_page_dynamic_mission.cpp | 2 +- .../bot_chat_page_dynamic_mission.h | 7 +- .../src/interface_v3/dbgroup_combo_box.cpp | 616 ----------------- .../src/interface_v3/dbgroup_combo_box.h | 162 ----- .../client/src/interface_v3/group_html.cpp | 2 +- .../client/src/interface_v3/group_html.h | 2 +- .../src/interface_v3/interface_parser.cpp | 2 +- .../client/src/interface_v3/macrocmd_key.cpp | 2 +- .../src/interface_v3/macrocmd_manager.cpp | 2 +- .../register_interface_elements.cpp | 2 +- .../client/src/interface_v3/skill_manager.cpp | 2 +- code/ryzom/client/src/login.cpp | 2 +- code/ryzom/client/src/r2/npc_editor.cpp | 2 +- 21 files changed, 810 insertions(+), 793 deletions(-) create mode 100644 code/nel/include/nel/gui/dbgroup_combo_box.h create mode 100644 code/nel/src/gui/dbgroup_combo_box.cpp delete mode 100644 code/ryzom/client/src/interface_v3/dbgroup_combo_box.cpp delete mode 100644 code/ryzom/client/src/interface_v3/dbgroup_combo_box.h diff --git a/code/nel/include/nel/gui/dbgroup_combo_box.h b/code/nel/include/nel/gui/dbgroup_combo_box.h new file mode 100644 index 000000000..e7a808f13 --- /dev/null +++ b/code/nel/include/nel/gui/dbgroup_combo_box.h @@ -0,0 +1,162 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + + + +#ifndef NL_DBGROUP_COMBO_BOX_H +#define NL_DBGROUP_COMBO_BOX_H + +#include "nel/misc/types_nl.h" +#include "nel/gui/interface_group.h" + +namespace NLGUI +{ + class CCtrlBaseButton; + class CViewText; + class CGroupMenu; + + + // *************************************************************************** + /** + * Widget: ComboBox of text + * \author Lionel Berenguier + * \author Nevrax France + * \date 2002 + */ + class CDBGroupComboBox : public CInterfaceGroup + { + public: + + /// Constructor + CDBGroupComboBox(const TCtorParam ¶m); + ~CDBGroupComboBox(); + + /// CInterfaceGroup Interface + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); + virtual void updateCoords (); + virtual void checkCoords (); + + // Combo Texts + void resetTexts(); + void addText(const ucstring &text); + void setText(uint i, const ucstring &text); + void insertText(uint i, const ucstring &text); + const ucstring &getText(uint i) const; + const ucstring &getTexture(uint i) const; + void removeText(uint i); + uint getNumTexts() const {return (uint)_Texts.size();} + + // selection + void setSelection(sint32 val); + void setSelectionNoTrigger(sint32 val); + sint32 getSelection() const; + + // selection number + void setSelectionNb(sint32 /* val */){} + sint32 getSelectionNb() const {return (sint32)_Texts.size();} + + // selection text + void setSelectionText(const std::string & val); + std::string getSelectionText() const; + + // view text + void setViewText(const ucstring & text); + ucstring getViewText() const; + + void setTexture(uint i, const ucstring &texture); + + sint32 evalContentWidth() const; + + + int luaAddText(CLuaState &ls); + int luaRemoveSelection(CLuaState &ls); + int luaRemoveText(CLuaState &ls); + int luaRemoveTextByIndex(CLuaState &ls); + int luaResetTexts(CLuaState &ls); + int luaSetText(CLuaState &ls); + int luaInsertText(CLuaState &ls); + int luaGetText(CLuaState &ls); + int luaGetNumTexts(CLuaState &ls); + int luaSetTexture(CLuaState &ls); + + + REFLECT_EXPORT_START(CDBGroupComboBox, CInterfaceGroup) + REFLECT_SINT32("selection", getSelection, setSelection) + REFLECT_LUA_METHOD("addText", luaAddText) + REFLECT_LUA_METHOD("setText", luaSetText) + REFLECT_LUA_METHOD("insertText", luaInsertText) + REFLECT_LUA_METHOD("setTexture", luaSetTexture) + REFLECT_LUA_METHOD("getText", luaGetText) + REFLECT_LUA_METHOD("getNumTexts", luaGetNumTexts) + REFLECT_LUA_METHOD("removeSelection", luaRemoveSelection) + REFLECT_LUA_METHOD("removeText", luaRemoveText) + REFLECT_LUA_METHOD("removeTextByIndex", luaRemoveTextByIndex) + REFLECT_LUA_METHOD("resetTexts", luaResetTexts) + REFLECT_SINT32 ("selectionNb", getSelectionNb, setSelectionNb) + REFLECT_STRING ("selection_text", getSelectionText, setSelectionText) + REFLECT_UCSTRING ("view_text", getViewText, setViewText) + REFLECT_EXPORT_END + + + protected: + friend class CHandlerComboBoxSelectStart; + + bool _LinkedToDB; // if not linked to db, then _NotLinkedToDBSelection is used instead + bool _Setuped; + bool _DirtySelection; + sint32 _CacheSelection; + + // sint32 + CInterfaceProperty _Selection; + sint32 _NotLinkedToDBSelection; + std::vector _Texts; + std::vector _Textures; + + // Action Handler called on combo click + std::string _AHOnSelectStart; + + // Action handler called when the content is changed + std::string _AHOnChange; + std::string _AHOnChangeParams; + bool _CallingOnChangeActionHandler; // avoid infinite loop here + + + // Children + CViewText *_ViewText; + CCtrlBaseButton *_SelectButton; + + bool _IsExternViewText; + ucstring _ExternViewText; + + + private: + void setup(); + void dirt(); + public: + // private : fill a menu with current content + void fillMenu(CGroupMenu *groupMenu) const; + + + static std::string measureMenu; + static std::string selectMenu; + static std::string selectMenuOut; + }; + +} + +#endif // NL_DBGROUP_COMBO_BOX_H + +/* End of dbgroup_combo_box.h */ diff --git a/code/nel/include/nel/gui/dbview_quantity.h b/code/nel/include/nel/gui/dbview_quantity.h index d692f0785..da6c2e933 100644 --- a/code/nel/include/nel/gui/dbview_quantity.h +++ b/code/nel/include/nel/gui/dbview_quantity.h @@ -42,6 +42,8 @@ namespace NLGUI virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual void draw (); + static void forceLink(); + protected: CInterfaceProperty _Number; diff --git a/code/nel/src/gui/dbgroup_combo_box.cpp b/code/nel/src/gui/dbgroup_combo_box.cpp new file mode 100644 index 000000000..5191e1f68 --- /dev/null +++ b/code/nel/src/gui/dbgroup_combo_box.cpp @@ -0,0 +1,622 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + + +#include "nel/gui/dbgroup_combo_box.h" +#include "nel/gui/group_menu.h" +#include "nel/misc/xml_auto_ptr.h" +#include "nel/gui/ctrl_button.h" +#include "nel/gui/action_handler.h" +#include "nel/gui/lua_ihm.h" +#include "nel/gui/widget_manager.h" +#include "nel/misc/i18n.h" + +using namespace std; +using namespace NLMISC; + +NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupComboBox, std::string, "combo_box"); + +namespace NLGUI +{ + + std::string CDBGroupComboBox::measureMenu; + std::string CDBGroupComboBox::selectMenu; + std::string CDBGroupComboBox::selectMenuOut; + + // *************************************************************************** + CDBGroupComboBox::CDBGroupComboBox(const TCtorParam ¶m) + : CInterfaceGroup(param) + { + _Setuped= false; + _ViewText= NULL; + _SelectButton= NULL; + _LinkedToDB = true; + _NotLinkedToDBSelection = 0; + _CallingOnChangeActionHandler = false; + _IsExternViewText = false; + dirt(); + } + + // *************************************************************************** + CDBGroupComboBox::~CDBGroupComboBox() + { + } + + // *************************************************************************** + sint32 CDBGroupComboBox::evalContentWidth() const + { + // get the menu to open. + CGroupMenu *groupMenu= dynamic_cast(CWidgetManager::getInstance()->getElementFromId( CDBGroupComboBox::measureMenu )); + if( !groupMenu ) + { + return 0; + } + fillMenu(groupMenu); + groupMenu->setActive(true); + groupMenu->updateCoords(); + sint32 width = groupMenu->getWReal(); + groupMenu->setActive(false); + groupMenu->reset(); + // add width for the selection arrow + return width; + } + + + // *************************************************************************** + bool CDBGroupComboBox::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) + { + if( !CInterfaceGroup::parse(cur, parentGroup) ) + return false; + + CXMLAutoPtr prop((const char*)xmlGetProp(cur, (xmlChar*)"linked_to_db")); + if (prop) + { + _LinkedToDB = convertBool(prop); + } + + if (_LinkedToDB) + { + // read the selection value + CXMLAutoPtr prop((const char*)xmlGetProp(cur, (xmlChar*)"value")); + if(!prop) + { + nlwarning("'value' not found in %s", _Id.c_str()); + return false; + } + else + { + _Selection.link((const char*)prop); + } + } + + // read the sons text + xmlNodePtr child; + child = cur->children; + while (child) + { + if (stricmp((char*)child->name,"combo_text") == 0) + { + CXMLAutoPtr name((const char*) xmlGetProp (child, (xmlChar*)"name")); + if (name) + { + const char *propPtr = name; + ucstring Text = ucstring::makeFromUtf8(propPtr); + if ((strlen(propPtr)>2) && (propPtr[0] == 'u') && (propPtr[1] == 'i')) + Text = CI18N::get (propPtr); + addText(Text); + } + } + child = child->next; + } + + // optional ActionHandler on click + prop= xmlGetProp(cur, (xmlChar*)"on_select_start"); + if(prop) _AHOnSelectStart= (const char*)prop; + + // optional ActionHandler on change + prop= xmlGetProp(cur, (xmlChar*)"on_change"); + if(prop) _AHOnChange= (const char*)prop; + + prop= xmlGetProp(cur, (xmlChar*)"on_change_params"); + if(prop) _AHOnChangeParams= (const char*)prop; + + + return true; + } + + // *************************************************************************** + void CDBGroupComboBox::checkCoords () + { + if(!_ViewText) + return; + bool mustUpdate = false; + if (_LinkedToDB) + { + // if some change in texts/selection + if(_DirtySelection || _CacheSelection!=_Selection.getSInt32()) + { + _CacheSelection= _Selection.getSInt32(); + mustUpdate = true; + } + } + else + { + // if some change in texts/selection + if(_DirtySelection || _CacheSelection != _NotLinkedToDBSelection) + { + _CacheSelection= _NotLinkedToDBSelection; + mustUpdate = true; + } + } + if (mustUpdate) + { + // change selected text + if(_CacheSelection<0 || _CacheSelection>=(sint32)_Texts.size() ) + { + _ViewText->setText(ucstring()); + } + else if(_IsExternViewText) + { + _ViewText->setText(_ExternViewText); + } + else + { + _ViewText->setText(_Texts[_CacheSelection]); + } + } + } + + // *************************************************************************** + void CDBGroupComboBox::updateCoords () + { + if(!_Setuped) + setup(); + CInterfaceGroup::updateCoords(); + } + + + // *************************************************************************** + void CDBGroupComboBox::dirt() + { + _DirtySelection= true; + } + + // *************************************************************************** + void CDBGroupComboBox::resetTexts() + { + dirt(); + _Texts.clear(); + _Textures.clear(); + } + + // *************************************************************************** + void CDBGroupComboBox::addText(const ucstring &text) + { + dirt(); + _Texts.push_back(text); + _Textures.push_back(std::string()); + } + + // *************************************************************************** + void CDBGroupComboBox::setText(uint i, const ucstring &text) + { + dirt(); + if(i<_Texts.size()) + _Texts[i]= text; + } + + // *************************************************************************** + void CDBGroupComboBox::insertText(uint i, const ucstring &text) + { + dirt(); + if(i<_Texts.size()) + { + addText(_Texts[_Texts.size()-1]); + + for(uint t=i; t<_Texts.size()-1; t++) + { + _Texts[t+1] = _Texts[t]; + _Textures[t+1] = _Textures[t]; + } + _Texts[i]= text; + _Textures[i] = std::string(); + } + else if(i==_Texts.size()) + addText(text); + } + + // *************************************************************************** + void CDBGroupComboBox::setTexture(uint i, const ucstring &texture) + { + dirt(); + if(i<_Textures.size()) + _Textures[i]= texture; + } + + // *************************************************************************** + void CDBGroupComboBox::removeText(uint i) + { + dirt(); + if(i<_Texts.size()) + { + _Texts.erase( _Texts.begin()+i ); + _Textures.erase( _Textures.begin()+i ); + } + } + + // *************************************************************************** + const ucstring &CDBGroupComboBox::getText(uint i) const + { + static ucstring null; + if(i<_Texts.size()) + return _Texts[i]; + else + return null; + } + + // *************************************************************************** + const ucstring &CDBGroupComboBox::getTexture(uint i) const + { + static ucstring null; + if(i<_Textures.size()) + return _Textures[i]; + else + return null; + } + + + // *************************************************************************** + void CDBGroupComboBox::setSelection(sint32 val) + { + _IsExternViewText = false; + + if (_LinkedToDB) + { + _Selection.setSInt32(val); + } + else + { + _NotLinkedToDBSelection = val; + } + if (!_AHOnChange.empty()) + { + if (!_CallingOnChangeActionHandler) + { + _CallingOnChangeActionHandler = true; + CAHManager::getInstance()->runActionHandler (_AHOnChange, this, _AHOnChangeParams); + _CallingOnChangeActionHandler = false; + } + } + } + + // *************************************************************************** + void CDBGroupComboBox::setSelectionNoTrigger(sint32 val) + { + if (_LinkedToDB) + { + _Selection.setSInt32(val); + } + else + { + _NotLinkedToDBSelection = val; + } + } + + // *************************************************************************** + sint32 CDBGroupComboBox::getSelection() const + { + if (_LinkedToDB) + { + return _Selection.getSInt32(); + } + else + { + return _NotLinkedToDBSelection; + } + } + + // *************************************************************************** + void CDBGroupComboBox::setSelectionText(const std::string & val) + { + sint32 value; + for(uint i=0; isetText(_ExternViewText); + } + + // *************************************************************************** + ucstring CDBGroupComboBox::getViewText() const + { + return _ViewText->getText(); + } + + // *************************************************************************** + std::string CDBGroupComboBox::getSelectionText() const + { + ucstring text; + if (_LinkedToDB) + { + text = getText(_Selection.getSInt32()); + } + else + { + text = getText(_NotLinkedToDBSelection); + } + std::string texteS; + text.toString(texteS); + return texteS; + } + + // *************************************************************************** + void CDBGroupComboBox::setup() + { + _Setuped= true; + + // get the viewText + _ViewText= dynamic_cast(CInterfaceGroup::getView("text")); + // get the button + _SelectButton= dynamic_cast(CInterfaceGroup::getCtrl("select")); + + // force the action handler + if( _SelectButton ) + _SelectButton->setActionOnLeftClick("combo_box_select_start"); + } + + + + // *************************************************************************** + int CDBGroupComboBox::luaRemoveSelection(CLuaState &ls) + { + CLuaIHM::checkArgCount(ls, "removeSelection", 1); + sint32 value; + if(CLuaIHM::popSINT32(ls, value)) + { + removeText(value); + } + return 0; + } + + // *************************************************************************** + int CDBGroupComboBox::luaRemoveText(CLuaState &ls) + { + CLuaIHM::checkArgCount(ls, "removeText", 1); + CLuaIHM::checkArgType(ls, "removeText", 1, LUA_TSTRING); + std::string text = ls.toString(1); + sint32 value; + for(uint i=0; ireset(); + for(uint i=0; iaddLine(getText(i), "combo_box_select_end", toString(i), + "", std::string(), getTexture(i).toString(), checkable); + } + + + } + + + + // *************************************************************************** + class CHandlerComboBoxSelectStart : public IActionHandler + { + public: + virtual void execute (CCtrlBase *pCaller, const std::string &/* Params */) + { + CDBGroupComboBox *pCB = dynamic_cast(pCaller->getParent()); + if (pCB == NULL) return; + // if no choice, return. + if( pCB->getNumTexts()==0 ) + return; + + // get the menu to open. + CGroupMenu *groupMenu= dynamic_cast(CWidgetManager::getInstance()->getElementFromId( CDBGroupComboBox::selectMenu )); + if( !groupMenu ) + { + groupMenu= dynamic_cast(CWidgetManager::getInstance()->getElementFromId( CDBGroupComboBox::selectMenuOut )); + } + if( !groupMenu ) + return; + + pCB->fillMenu(groupMenu); + + groupMenu->setMaxVisibleLine(8); + + // pos and size wisely the menu. + groupMenu->setMinW(pCB->getWReal()); + groupMenu->setX(pCB->getXReal()); + groupMenu->setBaseX(pCB->getXReal()); + groupMenu->setY(pCB->getYReal()); + groupMenu->setBaseY(pCB->getYReal()); + + // Must ensure the combo menu has same windows priority than the combo box window + CInterfaceGroup *rootWin= pCB->getRootWindow(); + if(rootWin) + groupMenu->setPriority(rootWin->getPriority()); + + // After menu init, Call user activation method + if( !pCB->_AHOnSelectStart.empty() ) + { + CAHManager::getInstance()->runActionHandler(pCB->_AHOnSelectStart, pCB); + } + + // launch the menu + // if the combo box is in a modal, must do a push, else just replace + if(dynamic_cast(pCB->getRootWindow())) + { + groupMenu->setCloseSubMenuUsingPopModal(true); + CWidgetManager::getInstance()->pushModalWindow(pCB, groupMenu); + } + else + { + groupMenu->setCloseSubMenuUsingPopModal(false); + CWidgetManager::getInstance()->enableModalWindow (pCB, groupMenu); + } + } + }; + REGISTER_ACTION_HANDLER (CHandlerComboBoxSelectStart, "combo_box_select_start"); + + + + + // *************************************************************************** + class CHandlerComboBoxSelectEnd : public IActionHandler + { + public: + virtual void execute (CCtrlBase * /* pCaller */, const std::string &Params) + { + CDBGroupComboBox *pCB = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); + if (pCB == NULL) return; + + // set the selection + sint32 selection; + fromString(Params, selection); + pCB->setSelection(selection); + } + }; + REGISTER_ACTION_HANDLER (CHandlerComboBoxSelectEnd, "combo_box_select_end"); + +} + + diff --git a/code/nel/src/gui/dbview_quantity.cpp b/code/nel/src/gui/dbview_quantity.cpp index fb6241339..8291d5cc2 100644 --- a/code/nel/src/gui/dbview_quantity.cpp +++ b/code/nel/src/gui/dbview_quantity.cpp @@ -111,4 +111,8 @@ namespace NLGUI setText(toString((const char*)buf)); } } + + void CDBViewQuantity::forceLink() + { + } } diff --git a/code/nel/src/gui/link_hack.cpp b/code/nel/src/gui/link_hack.cpp index a813014fd..2b1a59676 100644 --- a/code/nel/src/gui/link_hack.cpp +++ b/code/nel/src/gui/link_hack.cpp @@ -1,5 +1,6 @@ #include "nel/gui/dbview_bar3.h" #include "nel/gui/dbview_number.h" +#include "nel/gui/dbview_quantity.h" namespace NLGUI { @@ -8,5 +9,6 @@ namespace NLGUI { CDBViewBar3::forceLink(); CDBViewNumber::forceLink(); + CDBViewQuantity::forceLink(); } } \ No newline at end of file diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 9ef633596..9e058b6b0 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -71,7 +71,7 @@ #include "init_main_loop.h" #include "continent_manager.h" #include "interface_v3/group_quick_help.h" -#include "interface_v3/dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "r2/dmc/client_edition_module.h" #include "r2/editor.h" diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index e86792b46..4eb3a6cd7 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -82,7 +82,7 @@ #include "game_share/scores.h" // Game Config -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "nel/gui/ctrl_button.h" #include "../global.h" diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index b8573e74d..290598b95 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -32,7 +32,7 @@ #include "nel/gui/view_text_id.h" #include "../user_entity.h" #include "../entities.h" -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "nel/gui/dbview_bar.h" #include "../debug_client.h" #include "interface_3d_scene.h" diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp index 2d744f4ad..30e67b46a 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.cpp @@ -22,7 +22,7 @@ #include "nel/gui/interface_group.h" #include "../string_manager_client.h" #include "nel/gui/action_handler.h" -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "bot_chat_page_all.h" #include "bot_chat_manager.h" #include "../client_cfg.h" diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.h b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.h index 048267066..f6a320d90 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.h +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_dynamic_mission.h @@ -21,7 +21,10 @@ #include "bot_chat_page.h" -class CDBGroupComboBox; +namespace NLGUI +{ + class CDBGroupComboBox; +} // number of choices that the player must make to create a dynamic mission const uint DYNAMIC_MISSION_NUM_CHOICES = 3; @@ -51,7 +54,7 @@ public: void regen(); private: // The control for each choice list - CDBGroupComboBox *_ChoiceCB[DYNAMIC_MISSION_NUM_CHOICES]; + NLGUI::CDBGroupComboBox *_ChoiceCB[DYNAMIC_MISSION_NUM_CHOICES]; // current choice for each group (-1 means that choice has not been made) sint _Choice[DYNAMIC_MISSION_NUM_CHOICES]; // For each text ID, true if the text has been received diff --git a/code/ryzom/client/src/interface_v3/dbgroup_combo_box.cpp b/code/ryzom/client/src/interface_v3/dbgroup_combo_box.cpp deleted file mode 100644 index e35f1e159..000000000 --- a/code/ryzom/client/src/interface_v3/dbgroup_combo_box.cpp +++ /dev/null @@ -1,616 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - - -#include "dbgroup_combo_box.h" -#include "nel/gui/group_menu.h" -#include "nel/misc/xml_auto_ptr.h" -#include "nel/gui/ctrl_button.h" -#include "nel/gui/action_handler.h" -#include "nel/gui/lua_ihm.h" -#include "nel/gui/widget_manager.h" - -using namespace std; -using namespace NLMISC; - -NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupComboBox, std::string, "combo_box"); - -std::string CDBGroupComboBox::measureMenu; -std::string CDBGroupComboBox::selectMenu; -std::string CDBGroupComboBox::selectMenuOut; - -// *************************************************************************** -CDBGroupComboBox::CDBGroupComboBox(const TCtorParam ¶m) -: CInterfaceGroup(param) -{ - _Setuped= false; - _ViewText= NULL; - _SelectButton= NULL; - _LinkedToDB = true; - _NotLinkedToDBSelection = 0; - _CallingOnChangeActionHandler = false; - _IsExternViewText = false; - dirt(); -} - -// *************************************************************************** -CDBGroupComboBox::~CDBGroupComboBox() -{ -} - -// *************************************************************************** -sint32 CDBGroupComboBox::evalContentWidth() const -{ - // get the menu to open. - CGroupMenu *groupMenu= dynamic_cast(CWidgetManager::getInstance()->getElementFromId( CDBGroupComboBox::measureMenu )); - if( !groupMenu ) - { - return 0; - } - fillMenu(groupMenu); - groupMenu->setActive(true); - groupMenu->updateCoords(); - sint32 width = groupMenu->getWReal(); - groupMenu->setActive(false); - groupMenu->reset(); - // add width for the selection arrow - return width; -} - - -// *************************************************************************** -bool CDBGroupComboBox::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) -{ - if( !CInterfaceGroup::parse(cur, parentGroup) ) - return false; - - CXMLAutoPtr prop((const char*)xmlGetProp(cur, (xmlChar*)"linked_to_db")); - if (prop) - { - _LinkedToDB = convertBool(prop); - } - - if (_LinkedToDB) - { - // read the selection value - CXMLAutoPtr prop((const char*)xmlGetProp(cur, (xmlChar*)"value")); - if(!prop) - { - nlwarning("'value' not found in %s", _Id.c_str()); - return false; - } - else - { - _Selection.link((const char*)prop); - } - } - - // read the sons text - xmlNodePtr child; - child = cur->children; - while (child) - { - if (stricmp((char*)child->name,"combo_text") == 0) - { - CXMLAutoPtr name((const char*) xmlGetProp (child, (xmlChar*)"name")); - if (name) - { - const char *propPtr = name; - ucstring Text = ucstring::makeFromUtf8(propPtr); - if ((strlen(propPtr)>2) && (propPtr[0] == 'u') && (propPtr[1] == 'i')) - Text = CI18N::get (propPtr); - addText(Text); - } - } - child = child->next; - } - - // optional ActionHandler on click - prop= xmlGetProp(cur, (xmlChar*)"on_select_start"); - if(prop) _AHOnSelectStart= (const char*)prop; - - // optional ActionHandler on change - prop= xmlGetProp(cur, (xmlChar*)"on_change"); - if(prop) _AHOnChange= (const char*)prop; - - prop= xmlGetProp(cur, (xmlChar*)"on_change_params"); - if(prop) _AHOnChangeParams= (const char*)prop; - - - return true; -} - -// *************************************************************************** -void CDBGroupComboBox::checkCoords () -{ - if(!_ViewText) - return; - bool mustUpdate = false; - if (_LinkedToDB) - { - // if some change in texts/selection - if(_DirtySelection || _CacheSelection!=_Selection.getSInt32()) - { - _CacheSelection= _Selection.getSInt32(); - mustUpdate = true; - } - } - else - { - // if some change in texts/selection - if(_DirtySelection || _CacheSelection != _NotLinkedToDBSelection) - { - _CacheSelection= _NotLinkedToDBSelection; - mustUpdate = true; - } - } - if (mustUpdate) - { - // change selected text - if(_CacheSelection<0 || _CacheSelection>=(sint32)_Texts.size() ) - { - _ViewText->setText(ucstring()); - } - else if(_IsExternViewText) - { - _ViewText->setText(_ExternViewText); - } - else - { - _ViewText->setText(_Texts[_CacheSelection]); - } - } -} - -// *************************************************************************** -void CDBGroupComboBox::updateCoords () -{ - if(!_Setuped) - setup(); - CInterfaceGroup::updateCoords(); -} - - -// *************************************************************************** -void CDBGroupComboBox::dirt() -{ - _DirtySelection= true; -} - -// *************************************************************************** -void CDBGroupComboBox::resetTexts() -{ - dirt(); - _Texts.clear(); - _Textures.clear(); -} - -// *************************************************************************** -void CDBGroupComboBox::addText(const ucstring &text) -{ - dirt(); - _Texts.push_back(text); - _Textures.push_back(std::string()); -} - -// *************************************************************************** -void CDBGroupComboBox::setText(uint i, const ucstring &text) -{ - dirt(); - if(i<_Texts.size()) - _Texts[i]= text; -} - -// *************************************************************************** -void CDBGroupComboBox::insertText(uint i, const ucstring &text) -{ - dirt(); - if(i<_Texts.size()) - { - addText(_Texts[_Texts.size()-1]); - - for(uint t=i; t<_Texts.size()-1; t++) - { - _Texts[t+1] = _Texts[t]; - _Textures[t+1] = _Textures[t]; - } - _Texts[i]= text; - _Textures[i] = std::string(); - } - else if(i==_Texts.size()) - addText(text); -} - -// *************************************************************************** -void CDBGroupComboBox::setTexture(uint i, const ucstring &texture) -{ - dirt(); - if(i<_Textures.size()) - _Textures[i]= texture; -} - -// *************************************************************************** -void CDBGroupComboBox::removeText(uint i) -{ - dirt(); - if(i<_Texts.size()) - { - _Texts.erase( _Texts.begin()+i ); - _Textures.erase( _Textures.begin()+i ); - } -} - -// *************************************************************************** -const ucstring &CDBGroupComboBox::getText(uint i) const -{ - static ucstring null; - if(i<_Texts.size()) - return _Texts[i]; - else - return null; -} - -// *************************************************************************** -const ucstring &CDBGroupComboBox::getTexture(uint i) const -{ - static ucstring null; - if(i<_Textures.size()) - return _Textures[i]; - else - return null; -} - - -// *************************************************************************** -void CDBGroupComboBox::setSelection(sint32 val) -{ - _IsExternViewText = false; - - if (_LinkedToDB) - { - _Selection.setSInt32(val); - } - else - { - _NotLinkedToDBSelection = val; - } - if (!_AHOnChange.empty()) - { - if (!_CallingOnChangeActionHandler) - { - _CallingOnChangeActionHandler = true; - CAHManager::getInstance()->runActionHandler (_AHOnChange, this, _AHOnChangeParams); - _CallingOnChangeActionHandler = false; - } - } -} - -// *************************************************************************** -void CDBGroupComboBox::setSelectionNoTrigger(sint32 val) -{ - if (_LinkedToDB) - { - _Selection.setSInt32(val); - } - else - { - _NotLinkedToDBSelection = val; - } -} - -// *************************************************************************** -sint32 CDBGroupComboBox::getSelection() const -{ - if (_LinkedToDB) - { - return _Selection.getSInt32(); - } - else - { - return _NotLinkedToDBSelection; - } -} - -// *************************************************************************** -void CDBGroupComboBox::setSelectionText(const std::string & val) -{ - sint32 value; - for(uint i=0; isetText(_ExternViewText); -} - -// *************************************************************************** -ucstring CDBGroupComboBox::getViewText() const -{ - return _ViewText->getText(); -} - -// *************************************************************************** -std::string CDBGroupComboBox::getSelectionText() const -{ - ucstring text; - if (_LinkedToDB) - { - text = getText(_Selection.getSInt32()); - } - else - { - text = getText(_NotLinkedToDBSelection); - } - std::string texteS; - text.toString(texteS); - return texteS; -} - -// *************************************************************************** -void CDBGroupComboBox::setup() -{ - _Setuped= true; - - // get the viewText - _ViewText= dynamic_cast(CInterfaceGroup::getView("text")); - // get the button - _SelectButton= dynamic_cast(CInterfaceGroup::getCtrl("select")); - - // force the action handler - if( _SelectButton ) - _SelectButton->setActionOnLeftClick("combo_box_select_start"); -} - - - -// *************************************************************************** -int CDBGroupComboBox::luaRemoveSelection(CLuaState &ls) -{ - CLuaIHM::checkArgCount(ls, "removeSelection", 1); - sint32 value; - if(CLuaIHM::popSINT32(ls, value)) - { - removeText(value); - } - return 0; -} - -// *************************************************************************** -int CDBGroupComboBox::luaRemoveText(CLuaState &ls) -{ - CLuaIHM::checkArgCount(ls, "removeText", 1); - CLuaIHM::checkArgType(ls, "removeText", 1, LUA_TSTRING); - std::string text = ls.toString(1); - sint32 value; - for(uint i=0; ireset(); - for(uint i=0; iaddLine(getText(i), "combo_box_select_end", toString(i), - "", std::string(), getTexture(i).toString(), checkable); - } - - -} - - - -// *************************************************************************** -class CHandlerComboBoxSelectStart : public IActionHandler -{ -public: - virtual void execute (CCtrlBase *pCaller, const std::string &/* Params */) - { - CDBGroupComboBox *pCB = dynamic_cast(pCaller->getParent()); - if (pCB == NULL) return; - // if no choice, return. - if( pCB->getNumTexts()==0 ) - return; - - // get the menu to open. - CGroupMenu *groupMenu= dynamic_cast(CWidgetManager::getInstance()->getElementFromId( CDBGroupComboBox::selectMenu )); - if( !groupMenu ) - { - groupMenu= dynamic_cast(CWidgetManager::getInstance()->getElementFromId( CDBGroupComboBox::selectMenuOut )); - } - if( !groupMenu ) - return; - - pCB->fillMenu(groupMenu); - - groupMenu->setMaxVisibleLine(8); - - // pos and size wisely the menu. - groupMenu->setMinW(pCB->getWReal()); - groupMenu->setX(pCB->getXReal()); - groupMenu->setBaseX(pCB->getXReal()); - groupMenu->setY(pCB->getYReal()); - groupMenu->setBaseY(pCB->getYReal()); - - // Must ensure the combo menu has same windows priority than the combo box window - CInterfaceGroup *rootWin= pCB->getRootWindow(); - if(rootWin) - groupMenu->setPriority(rootWin->getPriority()); - - // After menu init, Call user activation method - if( !pCB->_AHOnSelectStart.empty() ) - { - CAHManager::getInstance()->runActionHandler(pCB->_AHOnSelectStart, pCB); - } - - // launch the menu - // if the combo box is in a modal, must do a push, else just replace - if(dynamic_cast(pCB->getRootWindow())) - { - groupMenu->setCloseSubMenuUsingPopModal(true); - CWidgetManager::getInstance()->pushModalWindow(pCB, groupMenu); - } - else - { - groupMenu->setCloseSubMenuUsingPopModal(false); - CWidgetManager::getInstance()->enableModalWindow (pCB, groupMenu); - } - } -}; -REGISTER_ACTION_HANDLER (CHandlerComboBoxSelectStart, "combo_box_select_start"); - - - - -// *************************************************************************** -class CHandlerComboBoxSelectEnd : public IActionHandler -{ -public: - virtual void execute (CCtrlBase * /* pCaller */, const std::string &Params) - { - CDBGroupComboBox *pCB = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); - if (pCB == NULL) return; - - // set the selection - sint32 selection; - fromString(Params, selection); - pCB->setSelection(selection); - } -}; -REGISTER_ACTION_HANDLER (CHandlerComboBoxSelectEnd, "combo_box_select_end"); - - diff --git a/code/ryzom/client/src/interface_v3/dbgroup_combo_box.h b/code/ryzom/client/src/interface_v3/dbgroup_combo_box.h deleted file mode 100644 index bf2a44c12..000000000 --- a/code/ryzom/client/src/interface_v3/dbgroup_combo_box.h +++ /dev/null @@ -1,162 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - - - -#ifndef NL_DBGROUP_COMBO_BOX_H -#define NL_DBGROUP_COMBO_BOX_H - -#include "nel/misc/types_nl.h" -#include "nel/gui/interface_group.h" - -namespace NLGUI -{ - class CCtrlBaseButton; - class CViewText; - class CGroupMenu; -} - - -// *************************************************************************** -/** - * Widget: ComboBox of text - * \author Lionel Berenguier - * \author Nevrax France - * \date 2002 - */ -class CDBGroupComboBox : public CInterfaceGroup -{ -public: - - /// Constructor - CDBGroupComboBox(const TCtorParam ¶m); - ~CDBGroupComboBox(); - - /// CInterfaceGroup Interface - virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); - virtual void updateCoords (); - virtual void checkCoords (); - - // Combo Texts - void resetTexts(); - void addText(const ucstring &text); - void setText(uint i, const ucstring &text); - void insertText(uint i, const ucstring &text); - const ucstring &getText(uint i) const; - const ucstring &getTexture(uint i) const; - void removeText(uint i); - uint getNumTexts() const {return (uint)_Texts.size();} - - // selection - void setSelection(sint32 val); - void setSelectionNoTrigger(sint32 val); - sint32 getSelection() const; - - // selection number - void setSelectionNb(sint32 /* val */){} - sint32 getSelectionNb() const {return (sint32)_Texts.size();} - - // selection text - void setSelectionText(const std::string & val); - std::string getSelectionText() const; - - // view text - void setViewText(const ucstring & text); - ucstring getViewText() const; - - void setTexture(uint i, const ucstring &texture); - - sint32 evalContentWidth() const; - - - int luaAddText(CLuaState &ls); - int luaRemoveSelection(CLuaState &ls); - int luaRemoveText(CLuaState &ls); - int luaRemoveTextByIndex(CLuaState &ls); - int luaResetTexts(CLuaState &ls); - int luaSetText(CLuaState &ls); - int luaInsertText(CLuaState &ls); - int luaGetText(CLuaState &ls); - int luaGetNumTexts(CLuaState &ls); - int luaSetTexture(CLuaState &ls); - - - REFLECT_EXPORT_START(CDBGroupComboBox, CInterfaceGroup) - REFLECT_SINT32("selection", getSelection, setSelection) - REFLECT_LUA_METHOD("addText", luaAddText) - REFLECT_LUA_METHOD("setText", luaSetText) - REFLECT_LUA_METHOD("insertText", luaInsertText) - REFLECT_LUA_METHOD("setTexture", luaSetTexture) - REFLECT_LUA_METHOD("getText", luaGetText) - REFLECT_LUA_METHOD("getNumTexts", luaGetNumTexts) - REFLECT_LUA_METHOD("removeSelection", luaRemoveSelection) - REFLECT_LUA_METHOD("removeText", luaRemoveText) - REFLECT_LUA_METHOD("removeTextByIndex", luaRemoveTextByIndex) - REFLECT_LUA_METHOD("resetTexts", luaResetTexts) - REFLECT_SINT32 ("selectionNb", getSelectionNb, setSelectionNb) - REFLECT_STRING ("selection_text", getSelectionText, setSelectionText) - REFLECT_UCSTRING ("view_text", getViewText, setViewText) - REFLECT_EXPORT_END - - -protected: - friend class CHandlerComboBoxSelectStart; - - bool _LinkedToDB; // if not linked to db, then _NotLinkedToDBSelection is used instead - bool _Setuped; - bool _DirtySelection; - sint32 _CacheSelection; - - // sint32 - CInterfaceProperty _Selection; - sint32 _NotLinkedToDBSelection; - std::vector _Texts; - std::vector _Textures; - - // Action Handler called on combo click - std::string _AHOnSelectStart; - - // Action handler called when the content is changed - std::string _AHOnChange; - std::string _AHOnChangeParams; - bool _CallingOnChangeActionHandler; // avoid infinite loop here - - - // Children - CViewText *_ViewText; - CCtrlBaseButton *_SelectButton; - - bool _IsExternViewText; - ucstring _ExternViewText; - - -private: - void setup(); - void dirt(); -public: - // private : fill a menu with current content - void fillMenu(CGroupMenu *groupMenu) const; - - - static std::string measureMenu; - static std::string selectMenu; - static std::string selectMenuOut; -}; - - -#endif // NL_DBGROUP_COMBO_BOX_H - -/* End of dbgroup_combo_box.h */ diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index 9e40cadb7..bb90cef39 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -42,7 +42,7 @@ extern "C" #include "interface_manager.h" #include "nel/gui/view_bitmap.h" #include "../actions.h" -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "nel/gui/lua_ihm.h" #include "../time_client.h" diff --git a/code/ryzom/client/src/interface_v3/group_html.h b/code/ryzom/client/src/interface_v3/group_html.h index 9f03ab050..9b21f01ed 100644 --- a/code/ryzom/client/src/interface_v3/group_html.h +++ b/code/ryzom/client/src/interface_v3/group_html.h @@ -42,9 +42,9 @@ namespace NLGUI class CCtrlButton; class CCtrlScroll; class CGroupList; + class CDBGroupComboBox; } -class CDBGroupComboBox; class CGroupParagraph; // HTML group diff --git a/code/ryzom/client/src/interface_v3/interface_parser.cpp b/code/ryzom/client/src/interface_v3/interface_parser.cpp index 1e59ad6fc..6dacf841a 100644 --- a/code/ryzom/client/src/interface_v3/interface_parser.cpp +++ b/code/ryzom/client/src/interface_v3/interface_parser.cpp @@ -87,7 +87,7 @@ // DBGroup #include "nel/gui/dbgroup_select_number.h" #include "dbgroup_list_sheet.h" -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "dbgroup_list_sheet_trade.h" #include "dbgroup_list_sheet_mission.h" #include "guild_manager.h" // for CDBGroupListAscensor diff --git a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp index 00abdaf88..a03ac010b 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp @@ -27,7 +27,7 @@ #include "nel/gui/ctrl_button.h" #include "nel/gui/group_editbox.h" #include "nel/gui/group_list.h" -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "nel/gui/group_container.h" #include "group_modal_get_key.h" #include "nel/gui/interface_expr.h" diff --git a/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp b/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp index 52c7ae45a..ab7c67073 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp @@ -28,7 +28,7 @@ #include "nel/gui/ctrl_button.h" #include "nel/gui/group_editbox.h" #include "nel/gui/group_list.h" -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "nel/gui/group_container.h" #include "group_modal_get_key.h" #include "task_bar_manager.h" diff --git a/code/ryzom/client/src/interface_v3/register_interface_elements.cpp b/code/ryzom/client/src/interface_v3/register_interface_elements.cpp index bad3da747..436e492e1 100644 --- a/code/ryzom/client/src/interface_v3/register_interface_elements.cpp +++ b/code/ryzom/client/src/interface_v3/register_interface_elements.cpp @@ -47,7 +47,7 @@ #include "nel/gui/dbview_bar3.h" #include "nel/gui/ctrl_scroll_base.h" #include "nel/gui/ctrl_scroll.h" -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "nel/gui/group_tab.h" #include "group_html.h" #include "nel/gui/group_header.h" diff --git a/code/ryzom/client/src/interface_v3/skill_manager.cpp b/code/ryzom/client/src/interface_v3/skill_manager.cpp index 1f849522b..176a53e1f 100644 --- a/code/ryzom/client/src/interface_v3/skill_manager.cpp +++ b/code/ryzom/client/src/interface_v3/skill_manager.cpp @@ -27,7 +27,7 @@ #include "nel/misc/cdb_leaf.h" #include "nel/gui/action_handler.h" #include "sbrick_manager.h" -#include "dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "nel/gui/view_bitmap.h" #include "../net_manager.h" #include "sbrick_manager.h" diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index ad9631f69..7d1b8a3fa 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -40,7 +40,7 @@ #include "nel/gui/view_text.h" #include "nel/gui/ctrl_button.h" #include "nel/gui/ctrl_text_button.h" -#include "interface_v3/dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "sound_manager.h" #include "far_tp.h" diff --git a/code/ryzom/client/src/r2/npc_editor.cpp b/code/ryzom/client/src/r2/npc_editor.cpp index e24f6d900..11cb94b38 100644 --- a/code/ryzom/client/src/r2/npc_editor.cpp +++ b/code/ryzom/client/src/r2/npc_editor.cpp @@ -23,7 +23,7 @@ #include "../interface_v3/interface_manager.h" #include "nel/gui/group_container.h" #include "displayer_visual_entity.h" -#include "../interface_v3/dbgroup_combo_box.h" +#include "nel/gui/dbgroup_combo_box.h" #include "../sheet_manager.h"