… | |
… | |
552 | } |
552 | } |
553 | |
553 | |
554 | sub set_opencont { |
554 | sub set_opencont { |
555 | my ($conn, $tag, $name) = @_; |
555 | my ($conn, $tag, $name) = @_; |
556 | $conn->{open_container} = $tag; |
556 | $conn->{open_container} = $tag; |
557 | $::INVR_LBL->set_text ($name); |
557 | |
|
|
558 | $::INV_RIGHT_HB->clear (); |
|
|
559 | $::INV_RIGHT_HB->add (new CFClient::UI::Label align => 0, expand => 1, text => $name); |
|
|
560 | |
|
|
561 | if ($tag != 0) { # Floor isn't closable, is it? |
|
|
562 | $::INV_RIGHT_HB->add (new CFClient::UI::Button |
|
|
563 | text => "Close container", |
|
|
564 | tooltip => "Close the currently open container (if one is open)", |
|
|
565 | on_activate => sub { |
|
|
566 | $::CONN->send ("apply $tag") # $::CONN->{open_container}") |
|
|
567 | if $tag != 0; |
|
|
568 | #if $CONN->{open_container} != 0; |
|
|
569 | }, |
|
|
570 | ); |
|
|
571 | } |
|
|
572 | |
558 | $::INVR->set_items ($conn->{container}{$tag}); |
573 | $::INVR->set_items ($conn->{container}{$tag}); |
559 | } |
574 | } |
560 | |
575 | |
561 | sub update_container { |
576 | sub update_container { |
562 | my ($tag) = @_; |
577 | my ($tag) = @_; |