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

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.260 by elmex, Tue May 30 14:35:09 2006 UTC vs.
Revision 1.261 by elmex, Tue May 30 14:45:56 2006 UTC

3221 3221
3222 my $self = $class->SUPER::new (binding => [], commands => [], @_); 3222 my $self = $class->SUPER::new (binding => [], commands => [], @_);
3223 3223
3224 $self->add (my $vb = new CFClient::UI::VBox); 3224 $self->add (my $vb = new CFClient::UI::VBox);
3225 3225
3226 $vb->add (my $hb = new CFClient::UI::HBox);
3227 $hb->add (new CFClient::UI::Label text => "Key: ");
3228 $hb->add ($self->{keylbl} = new CFClient::UI::Label);
3229 $hb->add (new CFClient::UI::Button
3230 text => "bind",
3231 tooltip => "This opens a query where you have to press the key combination to bind the recorded actions",
3232 on_activate => sub {
3233 $self->ask_for_bind;
3234 });
3235 3226
3236 $vb->add (new CFClient::UI::Label text => "Actions:");
3237 $vb->add ($self->{rec_btn} = new CFClient::UI::Button 3227 $vb->add ($self->{rec_btn} = new CFClient::UI::Button
3238 text => "start recording", 3228 text => "start recording",
3239 tooltip => "Start/Stops recording of actions." 3229 tooltip => "Start/Stops recording of actions."
3240 ."All subsequent actions after the recording started will be captured." 3230 ."All subsequent actions after the recording started will be captured."
3241 ."The actions are displayed after the record was stopped." 3231 ."The actions are displayed after the record was stopped."
3246 } else { 3236 } else {
3247 $self->stop; 3237 $self->stop;
3248 } 3238 }
3249 }); 3239 });
3250 3240
3241 $vb->add (new CFClient::UI::Label text => "Actions:");
3251 $vb->add ($self->{cmdbox} = new CFClient::UI::VBox); 3242 $vb->add ($self->{cmdbox} = new CFClient::UI::VBox);
3243
3244 $vb->add (new CFClient::UI::Label text => "Bound to: ");
3245 $vb->add (my $hb = new CFClient::UI::HBox);
3246 $hb->add ($self->{keylbl} = new CFClient::UI::Label expand => 1);
3247 $hb->add (new CFClient::UI::Button
3248 text => "bind",
3249 tooltip => "This opens a query where you have to press the key combination to bind the recorded actions",
3250 on_activate => sub {
3251 $self->ask_for_bind;
3252 });
3252 3253
3253 $vb->add (my $hb = new CFClient::UI::HBox); 3254 $vb->add (my $hb = new CFClient::UI::HBox);
3254 $hb->add (new CFClient::UI::Button 3255 $hb->add (new CFClient::UI::Button
3255 text => "ok", 3256 text => "ok",
3257 expand => 1,
3256 tooltip => "This closes the binding editor and saves the binding", 3258 tooltip => "This closes the binding editor and saves the binding",
3257 on_activate => sub { 3259 on_activate => sub {
3258 $self->hide; 3260 $self->hide;
3259 $self->commit; 3261 $self->commit;
3260 }); 3262 });
3261 3263
3262 $hb->add (new CFClient::UI::Button 3264 $hb->add (new CFClient::UI::Button
3263 text => "cancel", 3265 text => "cancel",
3266 expand => 1,
3264 tooltip => "This closes the binding editor without saving", 3267 tooltip => "This closes the binding editor without saving",
3265 on_activate => sub { 3268 on_activate => sub {
3266 $self->hide; 3269 $self->hide;
3267 $self->{binding_cancel}->() 3270 $self->{binding_cancel}->()
3268 if $self->{binding_cancel}; 3271 if $self->{binding_cancel};
3280 $::STATUSBOX->add ("Bound actions to '".CFClient::Binder::keycombo_to_name ($mod, $sym) 3283 $::STATUSBOX->add ("Bound actions to '".CFClient::Binder::keycombo_to_name ($mod, $sym)
3281 ."'. Don't forget 'Save Config'!"); 3284 ."'. Don't forget 'Save Config'!");
3282 $self->{binding_change}->($mod, $sym, $cmds) 3285 $self->{binding_change}->($mod, $sym, $cmds)
3283 if $self->{binding_change}; 3286 if $self->{binding_change};
3284 } else { 3287 } else {
3285 $::STATUSBOX->add ("No action bound, no keys specified!"); 3288 $::STATUSBOX->add ("No action bound, no key or action specified!");
3286 $self->{binding_cancel}->() 3289 $self->{binding_cancel}->()
3287 if $self->{binding_cancel}; 3290 if $self->{binding_cancel};
3288 } 3291 }
3289} 3292}
3290 3293

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines