ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.5 by elmex, Thu May 25 18:48:45 2006 UTC vs.
Revision 1.8 by root, Thu May 25 22:37:30 2006 UTC

1277 } 1277 }
1278 1278
1279 $self->{noface} = new_from_file CFClient::Texture 1279 $self->{noface} = new_from_file CFClient::Texture
1280 CFClient::find_rcfile "noface.png", minify => 1, mipmap => 1; 1280 CFClient::find_rcfile "noface.png", minify => 1, mipmap => 1;
1281 1281
1282 $self->{open_container} = 0;
1283
1282 $self 1284 $self
1283} 1285}
1284 1286
1285sub conn::stats_update { 1287sub conn::stats_update {
1286 my ($self, $stats) = @_; 1288 my ($self, $stats) = @_;
1753sub update_floorbox { 1755sub update_floorbox {
1754 $CFClient::UI::ROOT->on_refresh ($FLOORBOX => sub { 1756 $CFClient::UI::ROOT->on_refresh ($FLOORBOX => sub {
1755 return unless $CONN; 1757 return unless $CONN;
1756 1758
1757 $FLOORBOX->clear; 1759 $FLOORBOX->clear;
1758 $FLOORBOX->add (0, 1, new CFClient::UI::Empty expand => 1);
1759 1760
1760 my $row; 1761 my $row;
1761 for (@{ $CONN->{container}{0} }) { 1762 for (@{ $CONN->{container}{0} }) {
1762 if (++$row < 7) { 1763 if ($row < 7) {
1763 local $_->{face_widget}; # hack to force recreation of widget 1764 local $_->{face_widget}; # hack to force recreation of widget
1764 local $_->{desc_widget}; # hack to force recreation of widget 1765 local $_->{desc_widget}; # hack to force recreation of widget
1765 CFClient::Item::update_widgets $_; 1766 CFClient::Item::update_widgets $_;
1766 1767
1767 $FLOORBOX->add (0, $row, $_->{face_widget}); 1768 $FLOORBOX->add (0, $row, $_->{face_widget});
1768 $FLOORBOX->add (1, $row, $_->{desc_widget}); 1769 $FLOORBOX->add (1, $row, $_->{desc_widget});
1770
1771 $row++;
1769 } else { 1772 } else {
1770 $FLOORBOX->add (new CFClient::UI::Label text => "More..."); 1773 $FLOORBOX->add (1, $row, new CFClient::UI::Label text => "More...");
1771 last; 1774 last;
1772 } 1775 }
1773 } 1776 }
1774 }); 1777 });
1775 1778
1812 1815
1813 #d# print "container_clear: container $tag ($self->{player}{tag})\n"; 1816 #d# print "container_clear: container $tag ($self->{player}{tag})\n";
1814 1817
1815 if ($tag == 0) { 1818 if ($tag == 0) {
1816 update_floorbox; 1819 update_floorbox;
1820 update_container (0);
1817 } elsif ($tag == $self->{player}{tag}) { 1821 } elsif ($tag == $self->{player}{tag}) {
1818 $INV->set_items ($self->{container}{$tag}) 1822 $INV->set_items ($self->{container}{$tag})
1819 } 1823 }
1820 1824
1821# use PApp::Util; warn PApp::Util::dumpval $self->{container}{0}; 1825# use PApp::Util; warn PApp::Util::dumpval $self->{container}{0};
1856 } elsif ($item->{flags} & Crossfire::Protocol::F_OPEN) { 1860 } elsif ($item->{flags} & Crossfire::Protocol::F_OPEN) {
1857 set_opencont ($CONN, $item->{tag}, CFClient::Item::desc_string $item); 1861 set_opencont ($CONN, $item->{tag}, CFClient::Item::desc_string $item);
1858 } else { 1862 } else {
1859 if ($item->{container} == 0) { 1863 if ($item->{container} == 0) {
1860 update_floorbox; 1864 update_floorbox;
1865 update_container (0);
1861 } elsif ($item->{container} == $self->{player}{tag}) { 1866 } elsif ($item->{container} == $self->{player}{tag}) {
1862 $INV->set_items ($self->{container}{$item->{container}}) 1867 $INV->set_items ($self->{container}{$item->{container}})
1863 } 1868 }
1864 } 1869 }
1865} 1870}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines