--- deliantra/Deliantra-Client/bin/cfplus 2006/05/25 18:48:45 1.5 +++ deliantra/Deliantra-Client/bin/cfplus 2006/05/26 18:28:23 1.10 @@ -36,6 +36,7 @@ use Compress::LZF; use CFClient; +use CFClient::OpenGL (); use CFClient::UI; use CFClient::MapWidget; @@ -968,7 +969,7 @@ $SDL_ACTIVE = 1; $LAST_REFRESH = time - 0.01; - CFClient::gl_init; + CFClient::OpenGL::init; $FONTSIZE = int $HEIGHT / 40 * $CFG->{gui_fontsize}; @@ -1259,7 +1260,7 @@ my $parser = new Pod::POM; my $pod = $parser->parse_file (CFClient::find_rcfile "pod/command_help.pod"); - for my $head2 ($pod->head2) { + for my $head2 ($pod->head1->[-2]->head2) { $head2->title =~ /^(\S+) (?:\s+ \( ([^\)]*) \) )?/x or next; @@ -1279,6 +1280,8 @@ $self->{noface} = new_from_file CFClient::Texture CFClient::find_rcfile "noface.png", minify => 1, mipmap => 1; + $self->{open_container} = 0; + $self } @@ -1687,7 +1690,7 @@ my %skill_tooltip; - for my $head2 ($pod->head2) { + for my $head2 ($pod->head1->[-2]->head2) { $skill_tooltip{$head2->title} = CFClient::pod_to_pango $head2->content; } @@ -1755,19 +1758,20 @@ return unless $CONN; $FLOORBOX->clear; - $FLOORBOX->add (0, 1, new CFClient::UI::Empty expand => 1); my $row; for (@{ $CONN->{container}{0} }) { - if (++$row < 7) { + if ($row < 7) { local $_->{face_widget}; # hack to force recreation of widget local $_->{desc_widget}; # hack to force recreation of widget CFClient::Item::update_widgets $_; $FLOORBOX->add (0, $row, $_->{face_widget}); $FLOORBOX->add (1, $row, $_->{desc_widget}); + + $row++; } else { - $FLOORBOX->add (new CFClient::UI::Label text => "More..."); + $FLOORBOX->add (1, $row, new CFClient::UI::Label text => "More..."); last; } } @@ -1814,6 +1818,7 @@ if ($tag == 0) { update_floorbox; + update_container (0); } elsif ($tag == $self->{player}{tag}) { $INV->set_items ($self->{container}{$tag}) } @@ -1858,6 +1863,7 @@ } else { if ($item->{container} == 0) { update_floorbox; + update_container (0); } elsif ($item->{container} == $self->{player}{tag}) { $INV->set_items ($self->{container}{$item->{container}}) }