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

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.99 by elmex, Fri Jul 14 17:35:34 2006 UTC vs.
Revision 1.100 by root, Sun Jul 16 20:04:07 2006 UTC

285} 285}
286 286
287sub do_n_dialog { 287sub do_n_dialog {
288 my ($cb) = @_; 288 my ($cb) = @_;
289 289
290 my $w = new CFClient::UI::FancyFrame; 290 my $w = new CFClient::UI::FancyFrame
291 on_delete => sub { $_[0]->destroy; 1 },
292 has_close_button => 1,
293 ;
294
291 $w->add (my $vb = new CFClient::UI::VBox x => "center", y => "center"); 295 $w->add (my $vb = new CFClient::UI::VBox x => "center", y => "center");
292 $vb->add (new CFClient::UI::Label text => "Enter item count:"); 296 $vb->add (new CFClient::UI::Label text => "Enter item count:");
293 $vb->add (my $entry = new CFClient::UI::Entry 297 $vb->add (my $entry = new CFClient::UI::Entry
294 text => $last_enter_count, 298 text => $last_enter_count,
295 on_activate => sub { 299 on_activate => sub {
296 my ($entry) = @_; 300 my ($entry) = @_;
297 $last_enter_count = $entry->get_text; 301 $last_enter_count = $entry->get_text;
298 $cb->($last_enter_count); 302 $cb->($last_enter_count);
299 $w->hide; 303 $w->hide;
300 $w = undef; 304 $w->destroy;
305
306 0
301 } 307 },
308 on_escape => sub { $w->destroy; 1 },
302 ); 309 );
303 $entry->grab_focus; 310 $entry->grab_focus;
304 $w->show; 311 $w->show;
305
306} 312}
307 313
308sub update_widgets { 314sub update_widgets {
309 my ($self) = @_; 315 my ($self) = @_;
310 316

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines