--- deliantra/Deliantra-Client/DC/Protocol.pm 2006/05/29 19:30:28 1.9 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2006/05/30 07:26:02 1.11 @@ -341,12 +341,10 @@ $LAST_QUERY = $prompt; my $dialog = new CFClient::UI::FancyFrame + x => "center", + y => "center", title => "Query", child => my $vbox = new CFClient::UI::VBox, - on_visibility_change => sub { - my ($self, $visible) = @_; - $self->center if $visible; - }, ; $vbox->add (new CFClient::UI::Label @@ -554,7 +552,22 @@ sub set_opencont { my ($conn, $tag, $name) = @_; $conn->{open_container} = $tag; - $::INVR_LBL->set_text ($name); + + $::INV_RIGHT_HB->clear (); + $::INV_RIGHT_HB->add (new CFClient::UI::Label align => 0, expand => 1, text => $name); + + if ($tag != 0) { # Floor isn't closable, is it? + $::INV_RIGHT_HB->add (new CFClient::UI::Button + text => "Close container", + tooltip => "Close the currently open container (if one is open)", + on_activate => sub { + $::CONN->send ("apply $tag") # $::CONN->{open_container}") + if $tag != 0; + #if $CONN->{open_container} != 0; + }, + ); + } + $::INVR->set_items ($conn->{container}{$tag}); }