diff --git a/.gitignore b/.gitignore index 6d75a91f5..1d7b8efd4 100644 --- a/.gitignore +++ b/.gitignore @@ -216,6 +216,7 @@ code/ryzom/server/src/ryzom_admin_service/ryzom_admin_service code/ryzom/server/src/ryzom_naming_service/ryzom_naming_service code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service code/ryzom/server/src/tick_service/tick_service + # WebTT temp dir code/ryzom/tools/server/www/webtt/app/tmp @@ -236,13 +237,13 @@ code/ryzom/tools/server/ryzom_ams/old -#tools and external dir's +# Tools and external directories external external_stlport nel_tools* ryzom_tools* -#Dumps +# Dumps *.dmp code/nel/tools/build_gamedata/processes/ai_wmap/ai_build_wmap.cfg diff --git a/.travis.yml b/.travis.yml index ec12c9989..33b3d0f8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ os: matrix: fast_finish: true env: - - CMAKE_CONFIGURE_OPTIONS="-DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF" + - CMAKE_CONFIGURE_OPTIONS="-DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF" - CMAKE_CONFIGURE_OPTIONS="-DCPPTEST_LIBRARY_DEBUG:STRING=/usr/lib/libcpptest.so" CMAKE_BUILD_OPTIONS="--target nel_unit_test -- -j 2" RUN="build/bin/nel_unit_test" diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index cd82417d6..1a360bbc6 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -182,6 +182,9 @@ namespace NLGUI void setMarginLeft(sint32 m) { _MarginLeft = m; } sint32 getMarginLeft() const { return _MarginLeft; } + // Return inner width for child elements + virtual sint32 getInnerWidth() const; + /** * Get the max width used by the window. * diff --git a/code/nel/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index b9efd3357..01f2b9701 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -164,6 +164,7 @@ namespace NLGUI sint32 getMaxH () const { return _MaxH; } sint32 getMaxWReal () const { return _Active ? _MaxWReal : 0; } sint32 getMaxHReal () const { return _Active ? _MaxHReal : 0; } + sint32 getInnerWidth () const; sint32 getOfsX () const { return _OffsetX; } sint32 getOfsY () const { return _OffsetY; } bool getResizeFromChildW() const { return _ResizeFromChildW; } diff --git a/code/nel/src/gui/group_paragraph.cpp b/code/nel/src/gui/group_paragraph.cpp index b2635b52e..d7d50af2e 100644 --- a/code/nel/src/gui/group_paragraph.cpp +++ b/code/nel/src/gui/group_paragraph.cpp @@ -1410,7 +1410,7 @@ namespace NLGUI // Get the child width maxWidth += _Elements[k].Element->getMaxUsedW(); } - return maxWidth; + return maxWidth + _MarginLeft; } // ---------------------------------------------------------------------------- @@ -1425,7 +1425,7 @@ namespace NLGUI if (width > minWidth) minWidth = width; } - return minWidth; + return minWidth + _MarginLeft; } diff --git a/code/nel/src/gui/group_table.cpp b/code/nel/src/gui/group_table.cpp index ef3eca57a..b10114a18 100644 --- a/code/nel/src/gui/group_table.cpp +++ b/code/nel/src/gui/group_table.cpp @@ -703,7 +703,7 @@ namespace NLGUI { if (ContinuousUpdate) { - sint parentWidth = std::min(_Parent->getMaxWReal(), _Parent->getWReal()); + sint parentWidth = _Parent->getInnerWidth(); if (_LastParentW != (sint) parentWidth) { _LastParentW = parentWidth; @@ -813,10 +813,6 @@ namespace NLGUI for(sint span = 0; span < cell->ColSpan -1; ++span) { ++column; - _Columns[column].Width = std::max(_Columns[column].Width, _Columns[column-1].Width); - _Columns[column].WidthMax = std::max(_Columns[column].WidthMax, _Columns[column-1].WidthMax); - _Columns[column].TableRatio = std::max(_Columns[column].TableRatio, _Columns[column-1].TableRatio); - _Columns[column].WidthWanted = std::max(_Columns[column].WidthWanted, _Columns[column-1].WidthWanted); _Columns[column].RowSpan = _Columns[column-1].RowSpan; } } @@ -1163,7 +1159,7 @@ namespace NLGUI { if (_Parent != NULL) { - sint parentWidth = std::min(_Parent->getMaxWReal(), _Parent->getWReal()); + sint parentWidth = _Parent->getInnerWidth(); if (_LastParentW != (sint) parentWidth) { if (ContinuousUpdate) @@ -1311,6 +1307,9 @@ namespace NLGUI // ---------------------------------------------------------------------------- void CGroupTable::draw () { + // move X for clip and borders + _XReal += _MarginLeft; + // search a parent container CInterfaceGroup *gr = getParent(); while (gr) @@ -1391,6 +1390,9 @@ namespace NLGUI } CInterfaceGroup::draw (); + + // restore + _XReal -= _MarginLeft; } std::string CGroupTable::getProperties( const std::string &name ) const diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index 2e13d80e6..d3ed2d01c 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -506,10 +506,16 @@ namespace NLGUI } } + // ------------------------------------------------------------------------------------------------ + sint32 CInterfaceElement::getInnerWidth() const + { + return _WReal - _MarginLeft; + } + // ------------------------------------------------------------------------------------------------ void CInterfaceElement::updateCoords() { - _XReal = _X + _MarginLeft; + _XReal = _X; _YReal = _Y; _WReal = getW(); _HReal = getH(); @@ -526,7 +532,7 @@ namespace NLGUI if (el == NULL) return; - _XReal += el->_XReal - el->_MarginLeft; + _XReal += el->_XReal; _YReal += el->_YReal; THotSpot hsParent = _ParentPosRef; diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index d349411e1..5640da530 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -1397,6 +1397,13 @@ namespace NLGUI restoreClip (oldSciX, oldSciY, oldSciW, oldSciH); } + // ------------------------------------------------------------------------------------------------ + sint32 CInterfaceGroup::getInnerWidth() const + { + sint width = CInterfaceElement::getInnerWidth(); + return std::min(width, _MaxWReal - _MarginLeft); + } + // ------------------------------------------------------------------------------------------------ void CInterfaceGroup::checkCoords() { @@ -1468,7 +1475,7 @@ namespace NLGUI pIE->updateCoords(); } - _XReal -= _OffsetX - _MarginLeft; + _XReal -= (_OffsetX + _MarginLeft); _YReal -= _OffsetY; } @@ -1958,9 +1965,11 @@ namespace NLGUI newSciH = newSciH - ((newSciY+newSciH)-(oldSciY+oldSciH)); } - newSciXDest = newSciX - _MarginLeft; + // Don't apply margins because HTML list marker is drawn outside group paragraph inner content. + // Should not be an issue because horizontal scolling not used. + newSciXDest = newSciX/* + _MarginLeft*/; newSciYDest = newSciY; - newSciWDest = newSciW + _MarginLeft; + newSciWDest = newSciW/* - _MarginLeft*/; newSciHDest = newSciH; } diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index 767c7b75a..e36433e34 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -919,8 +919,7 @@ namespace NLGUI return _LineMaxW; else { - sint parentWidth = std::min(_Parent->getMaxWReal(), _Parent->getWReal() - _Parent->getMarginLeft()); - return std::min(parentWidth-(sint)(_XReal-(_Parent->getXReal()-_Parent->getMarginLeft())), (sint)_LineMaxW); + return std::min(_Parent->getInnerWidth(), (sint)_LineMaxW); } } diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index a3da447dc..66dd94c9f 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -1312,8 +1312,8 @@ void CClientEditionModule::onUserComponentDownloaded(NLNET::IModuleProxy *sender if (decompressionState != Z_OK) { - delete component; - nlwarning("Error: the downloaded user component is corrupted '%s' ", component->Filename.c_str()); + nlwarning("Error: the downloaded user component is corrupted '%s'", component->Filename.c_str()); + delete component; return; } component->UncompressedData[component->UncompressedDataLength] = '\0'; diff --git a/code/ryzom/server/src/ai_service/ai_instance.cpp b/code/ryzom/server/src/ai_service/ai_instance.cpp index ef7c4aea9..a4da91956 100644 --- a/code/ryzom/server/src/ai_service/ai_instance.cpp +++ b/code/ryzom/server/src/ai_service/ai_instance.cpp @@ -1566,3 +1566,5 @@ NLMISC_COMMAND(simulateMsgDespawnEasterEgg, "", "