--- deliantra/Deliantra-Client/DC.pm 2006/07/14 17:35:34 1.99 +++ deliantra/Deliantra-Client/DC.pm 2006/07/16 20:04:07 1.100 @@ -287,7 +287,11 @@ sub do_n_dialog { my ($cb) = @_; - my $w = new CFClient::UI::FancyFrame; + my $w = new CFClient::UI::FancyFrame + on_delete => sub { $_[0]->destroy; 1 }, + has_close_button => 1, + ; + $w->add (my $vb = new CFClient::UI::VBox x => "center", y => "center"); $vb->add (new CFClient::UI::Label text => "Enter item count:"); $vb->add (my $entry = new CFClient::UI::Entry @@ -297,12 +301,14 @@ $last_enter_count = $entry->get_text; $cb->($last_enter_count); $w->hide; - $w = undef; - } + $w->destroy; + + 0 + }, + on_escape => sub { $w->destroy; 1 }, ); $entry->grab_focus; $w->show; - } sub update_widgets {