* Updates the quantity-strings of the selected item. */
| 701 | * Updates the quantity-strings of the selected item. |
| 702 | */ |
| 703 | void TransferItemsState::updateItemStrings() |
| 704 | { |
| 705 | std::wostringstream ss1, ss2; |
| 706 | ss1 << _baseQty[_sel]; |
| 707 | ss2 << _transferQty[_sel]; |
| 708 | _lstItems->setCellText(_sel, 1, ss1.str()); |
| 709 | _lstItems->setCellText(_sel, 2, ss2.str()); |
| 710 | if (_transferQty[_sel] > 0) |
| 711 | { |
| 712 | _lstItems->setRowColor(_sel, Palette::blockOffset(13)); |
| 713 | } |
| 714 | else |
| 715 | { |
| 716 | _lstItems->setRowColor(_sel, Palette::blockOffset(13) + 10); |
| 717 | if (_sel > _itemOffset) |
| 718 | { |
| 719 | RuleItem *rule = _game->getRuleset()->getItem(_items[_sel - _itemOffset]); |
| 720 | if (rule->getBattleType() == BT_AMMO || (rule->getBattleType() == BT_NONE && rule->getClipSize() > 0)) |
| 721 | { |
| 722 | _lstItems->setRowColor(_sel, Palette::blockOffset(15) + 6); |
| 723 | } |
| 724 | } |
| 725 | } |
| 726 | } |
| 727 | |
| 728 | /** |
| 729 | * Gets the total cost of the current transfer. |
nothing calls this directly
no test coverage detected