Pad selectors(or "radio" selectors)

Post any examples or modules that you want to share here
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Pad selectors(or "radio" selectors)

Post by billv »

The current assignment I got from Trog is a bit hard, so i took another detour.
Here's some pad horizontal/vertical Pad selectors.
Has 3 main features, that prevent me from building a damn new selector every 5 min... ;)
1.Choose amount of selections
2. Re-sizable
3. Has an output for alternate values, ready to go..
Have done small test with PM and is working great.
NEW VERSION A FEW POSTS DOWN....
Last edited by billv on Sun Nov 02, 2014 6:42 am, edited 2 times in total.
Jay
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: Pad selectors

Post by Jay »

Thats really cool Billv

I will defo find use for this! Cheers! :D

Kind Regards
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Pad selectors

Post by Perfect Human Interface »

This is very cool. :)

There's a small error when you click on the borders between the selectors.
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Pad selectors

Post by billv »

Perfect Human Interface wrote:small error when you click on the borders

Yeh, your right. Thanks mate. I left the mdown on float when it should be int.
Bugfix:
In MouseLDown, change

Code: Select all

(For horizontal Selector..)
@x=x       # change this to
@x=x.to_i
(For vertical Selector..)
@y=y       # change this to
@y=y.to_i


BTW...a better example of this sort of thing is available...
check out the selector in this fsm by trog....creates columns/rows at the same time...
http://www.dsprobotics.com/support/viewtopic.php?f=3&t=601#p1962
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Pad selectors

Post by billv »

Perfect Human Interface wrote:small error

..is still there :( ....can't find the fix yet... :?
Selectors are not recommended unless you know what your doing and can fix/rebuild.
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Pad selectors(or "radio" selectors)

Post by billv »

I finally found the bug...was looking in wrong place for ages... :roll:
Here's the fixed versions...
Pad Selectors_BV_fixed.fsm
(82.11 KiB) Downloaded 1193 times


Bug was here... > was changed to >= in both lines.

Code: Select all

    x=0                                      
    @points.times do |x|                             
    @pos[x]=@y if @x >= @p[x] and @x < @p[x+1]
    @val[x]=1 if @x >= @p[x] and @x < @p[x+1]
    x += 1                                                             
    end
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Pad selectors(or "radio" selectors)

Post by RJHollins »

oh ... this is real nice :)

Just had a quick peek ... real nice how you have it to setup number of choices ... AND, having vert/horiz versions.

Very useful ... toolbox material.

Thanks Billv !
8-)
User avatar
kortezzzz
Posts: 763
Joined: Tue Mar 19, 2013 4:21 pm

Re: Pad selectors(or "radio" selectors)

Post by kortezzzz »

Great job, man. Radio buttons always find their way to my stuff. Thanks a lot. 8-)
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Pad selectors(or "radio" selectors)

Post by Nubeat7 »

i really like the concept of this selectors, thanks for sharing billv, but it could be done much easier and more lightweight,
i kept the concept and all features and cleaned up the properties so that everything can be set there, you also can set horizontal or vertical now in the properties, so its both in one ;)
Attachments
Pad Selectors_nubeat.fsm
(84.13 KiB) Downloaded 1217 times
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Pad selectors(or "radio" selectors)

Post by billv »

Awesome nubeat7... :D ..a guru version. Everyone should be happier with it... 8-)
Lots of stuff i learn from this....Cheers.
Properties panel is great, but I'm always frustrated that i can't see results in
real time while "tweaking" parameters in properties panel...
So I added a preview of the "view" of the selector to the properties panel.
Pad Selectors_nubeat_+.fsm
(86.09 KiB) Downloaded 1191 times
Post Reply