| 267 | } |
| 268 | |
| 269 | void ItemGridWidget::showDurability(bool show) { |
| 270 | m_showDurability = show; |
| 271 | |
| 272 | if (!m_bag) |
| 273 | return; |
| 274 | |
| 275 | for (size_t i = 0; i < m_bag->size() - m_bagOffset && i < (unsigned)m_dimensions[0] * m_dimensions[1]; ++i) { |
| 276 | auto itemSlot = m_slots.at(i); |
| 277 | itemSlot->showDurability(m_showDurability); |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | RectI ItemGridWidget::getScissorRect() const { |
| 282 | auto assets = Root::singleton().assets(); |
no test coverage detected