MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / update

Method update

source/frontend/StarMerchantInterface.cpp:144–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void MerchantPane::update(float dt) {
145 Pane::update(dt);
146
147 if (m_sourceEntityId != NullEntityId && !m_worldClient->playerCanReachEntity(m_sourceEntityId))
148 dismiss();
149
150 if (m_refreshTimer.wrapTick()) {
151 for (size_t i = 0; i < m_itemList.size(); ++i) {
152 auto itemConfig = m_itemList.get(i);
153 auto itemWidget = m_itemGuiList->itemAt(i);
154 setupWidget(itemWidget, itemConfig);
155 }
156 updateBuyTotal();
157 }
158
159 updateSelection();
160
161 m_itemGrid->updateAllItemSlots();
162}
163
164EntityId MerchantPane::sourceEntityId() const {
165 return m_sourceEntityId;

Callers

nothing calls this directly

Calls 6

playerCanReachEntityMethod · 0.80
wrapTickMethod · 0.80
updateAllItemSlotsMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45
itemAtMethod · 0.45

Tested by

no test coverage detected