Re: slimp3.pl plugins patches and comments

Robert Moser II <[email protected]> Sat, 15 Feb 2003 20:53:56 -0800
Newsgroups gmane.music.equipment.slimp3.dev
Message-ID <[email protected]>
At 03:07 PM 2/15/2003 -0800, you wrote:
>We disagree.

On that I agree.

 > There is also the possibility that the plugin developer would want to
> > have
> > a button behave differently to various pressing styles which may not be
> > mapped in the default [common] section.
>This is a good example.

Having provided a good example, I went ahead and coded it, and checked it in.

I also changed SlimTris to use 'rotate' instead of 'play'/'add', and added 
a 2Hz repeat rate for rotation (and slowed the up/down repeat rate to 
2Hz).  This was mainly to illustrate the principle.

To use this feature, add a defaultMap function to your plugin which returns 
a hash ref where the keys are button names and the values are function 
names.  For example the function I used in SlimTris.pm is this:
sub defaultMap {
         return {'play' => 'rotate_1'
                 ,'play.repeat' => 'rotate_1'
                 ,'add' => 'rotate_-1'
                 ,'add.repeat' => 'rotate_-1'
         }
}


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/FpY02D/vN2EAA/xGHJAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/