… | |
… | |
383 | $win->add (my $hbox = new CFClient::UI::HBox |
383 | $win->add (my $hbox = new CFClient::UI::HBox |
384 | children => [ |
384 | children => [ |
385 | (new CFClient::UI::HBox expand => 1), |
385 | (new CFClient::UI::HBox expand => 1), |
386 | (new CFClient::UI::VBox children => [ |
386 | (new CFClient::UI::VBox children => [ |
387 | (new CFClient::UI::Empty expand => 1), |
387 | (new CFClient::UI::Empty expand => 1), |
388 | (new CFClient::UI::Frame bg => [0, 0, 0, 0.4], child => ($FLOORBOX = new CFClient::UI::VBox)), |
388 | (new CFClient::UI::Frame bg => [0, 0, 0, 0.4], child => ($FLOORBOX = new CFClient::UI::Table)), |
389 | ]), |
389 | ]), |
390 | (my $vbox = new CFClient::UI::VBox), |
390 | (my $vbox = new CFClient::UI::VBox), |
391 | ], |
391 | ], |
392 | ); |
392 | ); |
393 | |
393 | |
… | |
… | |
1743 | sub update_floorbox { |
1743 | sub update_floorbox { |
1744 | $CFClient::UI::ROOT->on_refresh ($FLOORBOX => sub { |
1744 | $CFClient::UI::ROOT->on_refresh ($FLOORBOX => sub { |
1745 | return unless $CONN; |
1745 | return unless $CONN; |
1746 | |
1746 | |
1747 | $FLOORBOX->clear; |
1747 | $FLOORBOX->clear; |
1748 | $FLOORBOX->add (new CFClient::UI::Empty expand => 1); |
1748 | $FLOORBOX->add (0, 1, new CFClient::UI::Empty expand => 1); |
1749 | |
1749 | |
1750 | my $count = 7; |
1750 | my $row; |
1751 | for (@{ $CONN->{container}{0} }) { |
1751 | for (@{ $CONN->{container}{0} }) { |
1752 | if (--$count) { |
1752 | if (++$row < 7) { |
1753 | $FLOORBOX->add (new CFClient::UI::InventoryItem item => $_); |
1753 | CFClient::Item::update_widgets $_; |
|
|
1754 | $FLOORBOX->add (0, $row, $_->{face_widget}); |
|
|
1755 | $FLOORBOX->add (1, $row, $_->{desc_widget}); |
1754 | } else { |
1756 | } else { |
1755 | $FLOORBOX->add (new CFClient::UI::Label text => "More..."); |
1757 | $FLOORBOX->add (new CFClient::UI::Label text => "More..."); |
1756 | last; |
1758 | last; |
1757 | } |
1759 | } |
1758 | } |
1760 | } |