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

Comparing deliantra/Deliantra-Client/DC/Macro.pm (file contents):
Revision 1.2 by root, Sat Dec 9 21:44:43 2006 UTC vs.
Revision 1.3 by root, Sat Dec 9 22:06:51 2006 UTC

338 can_events => 1, 338 can_events => 1,
339 on_button_down => $macro_cb, 339 on_button_down => $macro_cb,
340 ); 340 );
341 341
342 $macros->add (1, $y, new CFPlus::UI::Label 342 $macros->add (1, $y, new CFPlus::UI::Label
343 text => (join "; ", @{ $macro->{action} }), 343 text => (join "; ", @{ $macro->{action} || [] }),
344 tooltip => $tooltip_commands . $tooltip_common, 344 tooltip => $tooltip_commands . $tooltip_common,
345 expand => 1, 345 expand => 1,
346 ellipsise => 3, 346 ellipsise => 3,
347 can_hover => 1, 347 can_hover => 1,
348 can_events => 1, 348 can_events => 1,
357} 357}
358 358
359# this is a shortcut method that asks for a binding 359# this is a shortcut method that asks for a binding
360# and then just binds it. 360# and then just binds it.
361sub quick_macro { 361sub quick_macro {
362 my ($self, $cmds, $end_cb) = @_; 362 my ($cmds, $end_cb) = @_;
363 363
364 my $macro = { 364 my $macro = {
365 action => $cmds, 365 action => $cmds,
366 }; 366 };
367 367
368 trigger_edit $macro, sub { 368 trigger_edit $macro, sub {
369
370 if ($_[0]) { 369 if ($_[0]) {
371 push @{ $::PROFILE->{macro} }, $macro; 370 push @{ $::PROFILE->{macro} }, $macro;
372 $REFRESH_MACRO_LIST->(); 371 $REFRESH_MACRO_LIST->();
373 } 372 }
374 373

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines