MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / GetPanelPosition

Function GetPanelPosition

Source/control.cpp:765–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

763}
764
765Point GetPanelPosition(UiPanels panel, Point offset)
766{
767 Displacement displacement { offset.x, offset.y };
768
769 switch (panel) {
770 case UiPanels::Main:
771 return GetMainPanel().position + displacement;
772 case UiPanels::Quest:
773 case UiPanels::Character:
774 case UiPanels::Stash:
775 return GetLeftPanel().position + displacement;
776 case UiPanels::Spell:
777 case UiPanels::Inventory:
778 return GetRightPanel().position + displacement;
779 default:
780 return GetMainPanel().position + displacement;
781 }
782}
783
784void DrawPanelBox(const Surface &out, SDL_Rect srcRect, Point targetPosition)
785{

Callers 15

PrintQLStringFunction · 0.85
DrawQuestLogFunction · 0.85
CheckChrBtnsFunction · 0.85
ReleaseChrBtnsFunction · 0.85
DrawGoldSplitFunction · 0.85
StartGoldDropFunction · 0.85
DrawInvFunction · 0.85
DrawUniqueInfoWindowFunction · 0.85
AttrIncBtnSnapFunction · 0.85
InvGetEquipSlotCoordFunction · 0.85
GetSlotCoordFunction · 0.85
InteractsWithCharButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected