|
|
|
|
@ -1784,10 +1784,31 @@ void PrintItemOil(char iDidx)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DrawUniqueInfoWindow(const Surface &out) |
|
|
|
|
{ |
|
|
|
|
ClxDraw(out, GetPanelPosition(UiPanels::Inventory, { 24 - SidePanelSize.width, 327 }), (*pSTextBoxCels)[0]); |
|
|
|
|
DrawHalfTransparentRectTo(out, GetRightPanel().position.x - SidePanelSize.width + 27, GetRightPanel().position.y + 28, 265, 297); |
|
|
|
|
Point DrawUniqueInfoWindow(const Surface &out) |
|
|
|
|
{ |
|
|
|
|
const bool isInStash = IsStashOpen && GetLeftPanel().contains(MousePosition); |
|
|
|
|
int panelX, panelY; |
|
|
|
|
if (isInStash) { |
|
|
|
|
ClxDraw(out, GetPanelPosition(UiPanels::Stash, { 24 + SidePanelSize.width, 327 }), (*pSTextBoxCels)[0]); |
|
|
|
|
panelX = GetLeftPanel().position.x + SidePanelSize.width + 27; |
|
|
|
|
panelY = GetLeftPanel().position.y + 28; |
|
|
|
|
} else { |
|
|
|
|
ClxDraw(out, GetPanelPosition(UiPanels::Inventory, { 24 - SidePanelSize.width, 327 }), (*pSTextBoxCels)[0]); |
|
|
|
|
panelX = GetRightPanel().position.x - SidePanelSize.width + 27; |
|
|
|
|
panelY = GetRightPanel().position.y + 28; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const Point rightInfoPos = GetRightPanel().position - Displacement { SidePanelSize.width, 0 }; |
|
|
|
|
const Point leftInfoPos = GetLeftPanel().position + Displacement { SidePanelSize.width, 0 }; |
|
|
|
|
|
|
|
|
|
const bool isInfoOverlapping = IsLeftPanelOpen() && IsRightPanelOpen() && GetLeftPanel().contains(rightInfoPos); |
|
|
|
|
int fadeLevel = isInfoOverlapping ? 3 : 1; |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < fadeLevel; ++i) { |
|
|
|
|
DrawHalfTransparentRectTo(out, panelX, panelY, 265, 297); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return isInStash ? leftInfoPos : rightInfoPos; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void printItemMiscKBM(const Item &item, const bool isOil, const bool isCastOnTarget) |
|
|
|
|
@ -3878,12 +3899,7 @@ bool DoOil(Player &player, int cii)
|
|
|
|
|
|
|
|
|
|
void DrawUniqueInfo(const Surface &out) |
|
|
|
|
{ |
|
|
|
|
const Point position = GetRightPanel().position - Displacement { SidePanelSize.width, 0 }; |
|
|
|
|
if (IsLeftPanelOpen() && GetLeftPanel().contains(position)) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DrawUniqueInfoWindow(out); |
|
|
|
|
const Point position = DrawUniqueInfoWindow(out); |
|
|
|
|
|
|
|
|
|
Rectangle rect { position + Displacement { 32, 56 }, { 257, 0 } }; |
|
|
|
|
const UniqueItem &uitem = UniqueItems[curruitem._iUid]; |
|
|
|
|
|