| 37 | } |
| 38 | |
| 39 | ItemPtr 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 | |
| 47 | ItemPtr ItemGridWidget::itemAt(size_t index) const { |
| 48 | if (index < m_bag->size()) |