… | |
… | |
1755 | sub update_floorbox { |
1755 | sub update_floorbox { |
1756 | $CFClient::UI::ROOT->on_refresh ($FLOORBOX => sub { |
1756 | $CFClient::UI::ROOT->on_refresh ($FLOORBOX => sub { |
1757 | return unless $CONN; |
1757 | return unless $CONN; |
1758 | |
1758 | |
1759 | $FLOORBOX->clear; |
1759 | $FLOORBOX->clear; |
1760 | $FLOORBOX->add (0, 1, new CFClient::UI::Empty expand => 1); |
|
|
1761 | |
1760 | |
1762 | my $row; |
1761 | my $row; |
1763 | for (@{ $CONN->{container}{0} }) { |
1762 | for (@{ $CONN->{container}{0} }) { |
1764 | if (++$row < 7) { |
1763 | if ($row < 7) { |
1765 | local $_->{face_widget}; # hack to force recreation of widget |
1764 | local $_->{face_widget}; # hack to force recreation of widget |
1766 | local $_->{desc_widget}; # hack to force recreation of widget |
1765 | local $_->{desc_widget}; # hack to force recreation of widget |
1767 | CFClient::Item::update_widgets $_; |
1766 | CFClient::Item::update_widgets $_; |
1768 | |
1767 | |
1769 | $FLOORBOX->add (0, $row, $_->{face_widget}); |
1768 | $FLOORBOX->add (0, $row, $_->{face_widget}); |
1770 | $FLOORBOX->add (1, $row, $_->{desc_widget}); |
1769 | $FLOORBOX->add (1, $row, $_->{desc_widget}); |
|
|
1770 | |
|
|
1771 | $row++; |
1771 | } else { |
1772 | } else { |
1772 | $FLOORBOX->add (1, ++$row, new CFClient::UI::Label text => "More..."); |
1773 | $FLOORBOX->add (1, $row, new CFClient::UI::Label text => "More..."); |
1773 | last; |
1774 | last; |
1774 | } |
1775 | } |
1775 | } |
1776 | } |
1776 | }); |
1777 | }); |
1777 | |
1778 | |