MCPcopy Create free account
hub / github.com/TurningWheel/Barony / getInventoryItemMailboxAnimSlotPos

Function getInventoryItemMailboxAnimSlotPos

src/interface/interface.cpp:38944–38956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38942const int mailBaseWidth = 206;
38943
38944void getInventoryItemMailboxAnimSlotPos(Frame* slotFrame, Player* player, int itemx, int itemy, int& outPosX, int& outPosY, int yOffset)
38945{
38946 outPosX = slotFrame->getSize().x + slotFrame->getParent()->getSize().x;
38947 outPosY = slotFrame->getSize().y + (player->inventoryUI.bCompactView ? 8 : 0) + yOffset;
38948 if ( itemy >= player->inventoryUI.DEFAULT_INVENTORY_SIZEY )
38949 {
38950 // backpack slots, add another offset.
38951 if ( auto invSlotsFrame = player->inventoryUI.frame->findFrame("inventory slots") )
38952 {
38953 outPosY += invSlotsFrame->getSize().h;
38954 }
38955 }
38956}
38957
38958bool GenericGUIMenu::MailboxGui_t::mailGUIHasBeenCreated() const
38959{

Callers 1

updateMailMenuMethod · 0.85

Calls 3

getSizeMethod · 0.80
findFrameMethod · 0.80
getParentMethod · 0.45

Tested by

no test coverage detected