ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Protocol.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.9 by elmex, Mon May 29 19:30:28 2006 UTC vs.
Revision 1.11 by root, Tue May 30 07:26:02 2006 UTC

339 339
340 $prompt = $LAST_QUERY unless length $prompt; 340 $prompt = $LAST_QUERY unless length $prompt;
341 $LAST_QUERY = $prompt; 341 $LAST_QUERY = $prompt;
342 342
343 my $dialog = new CFClient::UI::FancyFrame 343 my $dialog = new CFClient::UI::FancyFrame
344 x => "center",
345 y => "center",
344 title => "Query", 346 title => "Query",
345 child => my $vbox = new CFClient::UI::VBox, 347 child => my $vbox = new CFClient::UI::VBox,
346 on_visibility_change => sub {
347 my ($self, $visible) = @_;
348 $self->center if $visible;
349 },
350 ; 348 ;
351 349
352 $vbox->add (new CFClient::UI::Label 350 $vbox->add (new CFClient::UI::Label
353 max_w => $::WIDTH * 0.4, 351 max_w => $::WIDTH * 0.4,
354 ellipsise => 0, 352 ellipsise => 0,
552} 550}
553 551
554sub set_opencont { 552sub set_opencont {
555 my ($conn, $tag, $name) = @_; 553 my ($conn, $tag, $name) = @_;
556 $conn->{open_container} = $tag; 554 $conn->{open_container} = $tag;
557 $::INVR_LBL->set_text ($name); 555
556 $::INV_RIGHT_HB->clear ();
557 $::INV_RIGHT_HB->add (new CFClient::UI::Label align => 0, expand => 1, text => $name);
558
559 if ($tag != 0) { # Floor isn't closable, is it?
560 $::INV_RIGHT_HB->add (new CFClient::UI::Button
561 text => "Close container",
562 tooltip => "Close the currently open container (if one is open)",
563 on_activate => sub {
564 $::CONN->send ("apply $tag") # $::CONN->{open_container}")
565 if $tag != 0;
566 #if $CONN->{open_container} != 0;
567 },
568 );
569 }
570
558 $::INVR->set_items ($conn->{container}{$tag}); 571 $::INVR->set_items ($conn->{container}{$tag});
559} 572}
560 573
561sub update_container { 574sub update_container {
562 my ($tag) = @_; 575 my ($tag) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines