--- deliantra/Deliantra-Client/bin/cfplus 2006/05/28 00:40:52 1.20 +++ deliantra/Deliantra-Client/bin/cfplus 2006/05/28 01:16:04 1.21 @@ -714,14 +714,16 @@ sub server_setup { my $dialog = new CFClient::UI::FancyFrame - x => $WIDTH * (1/3), + x => $WIDTH * (1/3), y => $HEIGHT * (1/8), name => "server_setup", title => "Server Setup", child => (my $vbox = new CFClient::UI::VBox), on_visibility_change => sub { - $_[0]->show_centered if $_[1] - }; + my ($self, $visible) = @_; + $self->center if $visible; + }, + ; $vbox->add (my $table = new CFClient::UI::Table expand => 1, col_expand => [0, 1]); $table->add (0, 2, new CFClient::UI::Label valign => 0, align => 1, text => "Host:Port"); @@ -888,7 +890,6 @@ sub open_quit_dialog { unless ($QUIT_DIALOG) { - $QUIT_DIALOG = new CFClient::UI::FancyFrame title => "Really Quit?"; $QUIT_DIALOG->add (my $vb = new CFClient::UI::VBox expand => 1); @@ -909,34 +910,34 @@ expand => 1, on_activate => sub { exit }, ); - - $QUIT_DIALOG->show_centered; - } else { - $QUIT_DIALOG->show_centered; } + + $QUIT_DIALOG->show; + $QUIT_DIALOG->center; } sub make_inventory_window { my $invwin = new CFClient::UI::FancyFrame - def_w => $WIDTH * (7/8), - def_h => $HEIGHT * (7/8), + def_w => $WIDTH * 7/8, + def_h => $HEIGHT * 7/8, title => "Inventory", name => "inventory_window", on_visibility_change => sub { - $_[0]->show_centered if $_[1] - }; + my ($self, $visible) = @_; + $self->center if $visible; + }, + ; - $invwin->add (my $hb = new CFClient::UI::HBox expand => 1); + $invwin->add (my $hb = new CFClient::UI::HBox homogeneous => 1); - $hb->add (my $vb1 = new CFClient::UI::VBox expand => 1); - $vb1->add (my $lbl = new CFClient::UI::Label align => 0); - $lbl->set_text ("Player"); - $vb1->add ($INV = new CFClient::UI::Inventory expand => 1); + $hb->add (my $vb1 = new CFClient::UI::VBox); + $vb1->add (new CFClient::UI::Label align => 0, text => "Player"); + $vb1->add ($INV = new CFClient::UI::Inventory expand => 1); - $hb->add (my $vb2 = new CFClient::UI::VBox expand => 1); + $hb->add (my $vb2 = new CFClient::UI::VBox); $vb2->add (my $hb2 = new CFClient::UI::HBox); - $hb2->add ($INVR_LBL = new CFClient::UI::Label align => 0, expand => 1); + $hb2->add ($INVR_LBL = new CFClient::UI::Label align => 0, expand => 1, text => "Floor"); $hb2->add (new CFClient::UI::Button text => "Close", tooltip => "Close the currently open container (if one is open)", @@ -946,7 +947,6 @@ }, ); - $INVR_LBL->set_text ("Floor"); $vb2->add ($INVR = new CFClient::UI::Inventory expand => 1); $invwin