From 2eb56b64600cc1660627f2a9ec832bdace329019 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 18 Dec 2015 14:29:40 +0200 Subject: [PATCH] Added html HR element --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 37 +++++++++++++++++++ .../gamedev/interfaces_v3/login_widgets.xml | 23 +++++++++++- .../data/gamedev/interfaces_v3/widgets.xml | 23 ++++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 4c851285b..d464b5a0c 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -2032,6 +2032,43 @@ namespace NLGUI endParagraph(); } break; + case HTML_HR: + { + newParagraph(0); + + CInterfaceGroup *sep = CWidgetManager::getInstance()->getParser()->createGroupInstance("html_hr", "", NULL, 0); + if (sep) + { + CStyleParams style; + style.TextColor = CRGBA(120, 120, 120, 255); + style.Height = 0; + style.Width = 0; + + if (present[HTML_HR_STYLE] && value[HTML_HR_STYLE]) + getStyleParams(value[HTML_HR_STYLE], style); + + CViewBitmap *bitmap = dynamic_cast(sep->getView("hr")); + if (bitmap) + { + bitmap->setColor(style.TextColor); + if (style.Width > 0) + { + clamp(style.Width, 1, 32000); + bitmap->setW(style.Width); + bitmap->setSizeRef(CInterfaceElement::none); + } + if (style.Height > 0) + { + clamp(style.Height, 1, 1000); + bitmap->setH(style.Height); + } + } + + getParagraph()->addChild(sep); + endParagraph(); + } + } + break; } } } diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml b/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml index f41fa207c..8ca822dd7 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml @@ -955,6 +955,27 @@ highlight_over="255 255 255 128" force_inside_screen="true" /> - + + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml index f272c6735..2a928b858 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml @@ -6927,4 +6927,27 @@ + + +