Merge with develop

--HG--
branch : compatibility-develop
hg/compatibility-develop
Nimetu 6 years ago
commit 56727e7818

5
.gitignore vendored

@ -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

@ -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"

@ -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.
*

@ -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; }

@ -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;
}

@ -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

@ -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;

@ -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;
}

@ -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);
}
}

@ -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';

@ -1566,3 +1566,5 @@ NLMISC_COMMAND(simulateMsgDespawnEasterEgg, "", "<service_id> <ai_instance> <eas
return true;
}
#include "event_reaction_include.h"

Loading…
Cancel
Save