From dca90ab3d6711b5f2efc18feef79c0f77d411c97 Mon Sep 17 00:00:00 2001 From: nimetu Date: Thu, 27 Jan 2022 21:29:52 +0200 Subject: [PATCH] Hide 1x quantity for equipable items, dynamic buff icon placement --- .../client/src/interface_v3/dbctrl_sheet.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 0b8cda2ee..408aee01e 100644 --- a/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -1428,6 +1428,23 @@ void CDBCtrlSheet::setupItem () } } + // hide x1 on equipable items to show BuffIcons on bottom-left corner + if (_DispQuantity == 1) + { + switch(_ItemSheet->Family) + { + case ITEMFAMILY::ARMOR: + case ITEMFAMILY::MELEE_WEAPON: + case ITEMFAMILY::RANGE_WEAPON: + case ITEMFAMILY::SHIELD: + case ITEMFAMILY::JEWELRY: + _DispQuantity = -1; + break; + default: + break; + } + } + // at each frame, must test for grayed. if(_AutoGrayed) { @@ -2535,7 +2552,7 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti sint32 hArea = (hSheet / 4); sint32 xIcon = x; // move buff icons up a row, quantity text is displayed on bottom-left corner - sint32 yIcon = y + hArea; + sint32 yIcon = y + (_DispQuantity > 0 ? hArea : 0); for (uint i = 0; i < _BuffIcons.size(); ++i) { sint32 wIcon = _BuffIcons[i].IconW;