Skip to content

Commit

Permalink
Show more items in inventory view.
Browse files Browse the repository at this point in the history
The inventory is the view that will likely have the more items,
and the fact of showing more items per screen feels more practical
to me and gives a sense, for instance in showing
the current item icon in the bottom window.
  • Loading branch information
Yohann Ferreira committed Mar 29, 2013
1 parent e64fd22 commit ddad054
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/modes/menu/menu_views.cpp
Expand Up @@ -147,7 +147,7 @@ void InventoryWindow::_InitInventoryItems()
{
// Set up the inventory option box
_inventory_items.SetPosition(500.0f, 170.0f);
_inventory_items.SetDimensions(400.0f, 360.0f, 1, 255, 1, 6);
_inventory_items.SetDimensions(400.0f, 360.0f, 1, 255, 1, 10);
_inventory_items.SetTextStyle(TextStyle("text20"));
_inventory_items.SetCursorOffset(-52.0f, -20.0f);
_inventory_items.SetVerticalWrapMode(VIDEO_WRAP_MODE_STRAIGHT);
Expand Down Expand Up @@ -564,12 +564,17 @@ void InventoryWindow::_UpdateItemText()
std::vector<ustring> inv_names;

for(size_t ctr = 0; ctr < _item_objects.size(); ctr++) {
text = MakeUnicodeString("<" + _item_objects[ctr]->GetIconImage().GetFilename() + "><32> ") +
text = MakeUnicodeString("<" + _item_objects[ctr]->GetIconImage().GetFilename() + "><20> ") +
_item_objects[ctr]->GetName() + MakeUnicodeString("<R><350>" + NumberToString(_item_objects[ctr]->GetCount()) + " ");
inv_names.push_back(text);
}

_inventory_items.SetOptions(inv_names);
for (uint32 i = 0; i < _inventory_items.GetNumberOptions(); ++i) {
StillImage *image = _inventory_items.GetEmbeddedImage(i);
if (image)
image->SetWidthKeepRatio(32);
}

if(current_selected_category != _previous_category )
{
Expand Down

0 comments on commit ddad054

Please sign in to comment.