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

Method itemAt

source/windowing/StarItemGridWidget.cpp:39–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39ItemPtr ItemGridWidget::itemAt(Vec2I const& position) const {
40 auto pos = bagLocationAt(position);
41 if (pos != NPos && m_bag)
42 return m_bag->at(pos);
43
44 return {};
45}
46
47ItemPtr ItemGridWidget::itemAt(size_t index) const {
48 if (index < m_bag->size())

Callers

nothing calls this directly

Calls 2

atMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected