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

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.116 by root, Mon Aug 14 04:15:04 2006 UTC vs.
Revision 1.117 by elmex, Tue Aug 15 06:30:05 2006 UTC

1126 1126
1127 $window 1127 $window
1128} 1128}
1129 1129
1130sub open_string_query { 1130sub open_string_query {
1131 my $cb = $_[1]; 1131 my ($title, $cb, $txt, $tooltip) = @_;
1132 my $dialog = new CFPlus::UI::Toplevel 1132 my $dialog = new CFPlus::UI::Toplevel
1133 x => "center", 1133 x => "center",
1134 y => "center", 1134 y => "center",
1135 z => 50, 1135 z => 50,
1136 force_w => $WIDTH * 4/5, 1136 force_w => $WIDTH * 4/5,
1137 title => $_[0]; 1137 title => $title;
1138 1138
1139 $dialog->add ( 1139 $dialog->add (
1140 my $e = new CFPlus::UI::Entry 1140 my $e = new CFPlus::UI::Entry
1141 on_activate => sub { $cb->(@_); $dialog->hide; 0 }, 1141 on_activate => sub { $cb->(@_); $dialog->hide; 0 },
1142 on_key_down => sub { $_[1]->{sym} == 27 and $dialog->hide; 0 }, 1142 on_key_down => sub { $_[1]->{sym} == 27 and $dialog->hide; 0 },
1143 tooltip => $tooltip
1143 ); 1144 );
1144 1145
1145 $e->grab_focus; 1146 $e->grab_focus;
1147 $e->set_text ($txt) if $txt;
1146 $dialog->show; 1148 $dialog->show;
1147} 1149}
1148 1150
1149sub open_quit_dialog { 1151sub open_quit_dialog {
1150 unless ($QUIT_DIALOG) { 1152 unless ($QUIT_DIALOG) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines