… | |
… | |
101 | our $DEBUG_STATUS; |
101 | our $DEBUG_STATUS; |
102 | |
102 | |
103 | our $INV_WINDOW; |
103 | our $INV_WINDOW; |
104 | our $INV; |
104 | our $INV; |
105 | our $INVR; |
105 | our $INVR; |
106 | our $INVR_LBL; |
106 | our $INV_RIGHT_HB; |
107 | |
107 | |
108 | our $BIND_WINDOW; |
108 | our $BIND_WINDOW; |
109 | |
109 | |
110 | sub status { |
110 | sub status { |
111 | $STATUSBOX->add (CFClient::UI::Label::escape $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]); |
111 | $STATUSBOX->add (CFClient::UI::Label::escape $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]); |
… | |
… | |
941 | $vb1->add (new CFClient::UI::Label align => 0, text => "Player"); |
941 | $vb1->add (new CFClient::UI::Label align => 0, text => "Player"); |
942 | $vb1->add ($INV = new CFClient::UI::Inventory expand => 1); |
942 | $vb1->add ($INV = new CFClient::UI::Inventory expand => 1); |
943 | |
943 | |
944 | $hb->add (my $vb2 = new CFClient::UI::VBox); |
944 | $hb->add (my $vb2 = new CFClient::UI::VBox); |
945 | |
945 | |
946 | $vb2->add (my $hb2 = new CFClient::UI::HBox); |
946 | $vb2->add ($INV_RIGHT_HB = new CFClient::UI::HBox); |
947 | $hb2->add ($INVR_LBL = new CFClient::UI::Label align => 0, expand => 1, text => "Floor"); |
|
|
948 | $hb2->add (new CFClient::UI::Button |
|
|
949 | text => "Close container", |
|
|
950 | tooltip => "Close the currently open container (if one is open)", |
|
|
951 | on_activate => sub { |
|
|
952 | $CONN->send ("apply $CONN->{open_container}") |
|
|
953 | if $CONN->{open_container} != 0; |
|
|
954 | }, |
|
|
955 | ); |
|
|
956 | |
947 | |
957 | $vb2->add ($INVR = new CFClient::UI::Inventory expand => 1); |
948 | $vb2->add ($INVR = new CFClient::UI::Inventory expand => 1); |
|
|
949 | |
|
|
950 | # XXX: Call after $INVR = ... because set_opencont sets the items |
|
|
951 | CFClient::Protocol::set_opencont ($::CONN, 0, "Floor"); |
958 | |
952 | |
959 | $invwin |
953 | $invwin |
960 | } |
954 | } |
961 | |
955 | |
962 | sub make_binding_window { |
956 | sub make_binding_window { |