From bc8487d3383f96144a6b3b58e0604d8d5c36c240 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 23 Feb 2016 10:52:21 +0200 Subject: [PATCH] Changed: Implement multi-row select box --- code/nel/include/nel/gui/group_html.h | 20 ++ code/nel/include/nel/gui/group_menu.h | 1 + code/nel/src/gui/group_html.cpp | 192 +++++++++++++++++- code/nel/src/gui/group_menu.cpp | 11 + .../gamedev/interfaces_v3/login_widgets.xml | 19 ++ .../data/gamedev/interfaces_v3/widgets.xml | 20 ++ 6 files changed, 253 insertions(+), 10 deletions(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 7a09b8281..635136220 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -34,6 +34,7 @@ namespace NLGUI class CCtrlButton; class CCtrlScroll; class CGroupList; + class CGroupMenu; class CDBGroupComboBox; class CGroupParagraph; @@ -189,6 +190,7 @@ namespace NLGUI std::string DefaultFormTextGroup; std::string DefaultFormTextAreaGroup; std::string DefaultFormSelectGroup; + std::string DefaultFormSelectBoxMenuGroup; std::string DefaultCheckBoxBitmapNormal; std::string DefaultCheckBoxBitmapPushed; std::string DefaultCheckBoxBitmapOver; @@ -345,6 +347,7 @@ namespace NLGUI // Add a combo box in the current paragraph CDBGroupComboBox *addComboBox(const std::string &templateName, const char *name); + CGroupMenu *addSelectBox(const std::string &templateName, const char *name); // Add a button in the current paragraph. actionHandler, actionHandlerParams and tooltip can be NULL. CCtrlButton *addButton(CCtrlButton::EType type, const std::string &name, const std::string &normalBitmap, const std::string &pushedBitmap, @@ -630,6 +633,10 @@ namespace NLGUI TextArea = NULL; Checkbox = NULL; ComboBox = NULL; + SelectBox = NULL; + sbRBRef = NULL; + sbMultiple = false; + sbOptionDisabled = -1; InitialSelection = 0; } @@ -648,6 +655,19 @@ namespace NLGUI // Combobox group CDBGroupComboBox *ComboBox; + // Combobox with multiple selection or display size >= 2 + CGroupMenu *SelectBox; + + // Single or multiple selections for SelectBox + bool sbMultiple; + + // Marks OPTION element as disabled + // Only valid when parsing html + sint sbOptionDisabled; + + // First radio button in SelectBox if single selection + CCtrlBaseButton *sbRBRef; + // select values (for the