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

Method updateAllItemSlots

source/windowing/StarItemGridWidget.cpp:193–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void ItemGridWidget::updateAllItemSlots() {
194 if (!m_bag)
195 return;
196
197 for (size_t i = 0; i < m_bag->size() - m_bagOffset && i < (unsigned)m_dimensions[0] * m_dimensions[1]; ++i) {
198 auto item = m_bag->at(i + m_bagOffset);
199 auto slot = m_slots.at(i);
200 slot->setItem(item);
201 slot->setHighlightEnabled(!item && m_highlightEmpty);
202 }
203}
204
205void ItemGridWidget::updateItemState() {
206 updateAllItemSlots();

Callers 2

updateMethod · 0.80
updateMethod · 0.80

Calls 4

setHighlightEnabledMethod · 0.80
sizeMethod · 0.45
atMethod · 0.45
setItemMethod · 0.45

Tested by

no test coverage detected