Old 01-25-2020, 03:22 AM   #1
lerian
Human being with feelings
 
Join Date: Oct 2011
Posts: 254
Default V6 theme adjuster elements size steps - labels, volume

Is it possible to also mod the values for the theme adjuster label/volume expanders to add more intermediary steps? The jump from 100 to 130 is too big, i want to change it in increments of 10. I was looking into the lua but didnt quite got it how its done.


Thanks
lerian is offline   Reply With Quote
Old 01-25-2020, 04:22 AM   #2
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,812
Default

A theme parameter starts its life in the theme's rtconfig, with a (still undocumented, sorry) 'define_parameter' declaration. In Default6, I do this using my 'indexParams' macro, because I chose to do my params as numbers. For example:

Code:
indexParams 'A_tcp_vol_size' 			1 	1 	7 	3
min value is 1, max is 7. So if you want more values, first thing is to raise the max value there.

Ok, now we can go to the script. Here's the control for the volume size:
Code:
Spinner:new(_layoutTrack, {x=192,y=29,w=127,title='VOLUME SIZE',action=paramSet,param='tcp_vol_size',valsTable=tcpVolVals})
which references 'tcpVolVals' ...that's just a table of strings to display to the script user. Add more if you add more values.

The script sends the theme the chosen value as a number. Back in the theme, for each layout I use that number to alter a WALTER scalar, using a 'set scalar' command. I have also wrapped that into a macro, which I called 'paramPair'.

Code:
paramPair 	tcp_VolSize 					3 20 40 70 100 130 160 190
that line creates a scalar (tcp_VolSize), attaches it to a param index (3) and then lists the values that WALTER will use (20, 40, etc).

---------------

SO: To add one new value to the tcp volume size:

1 In the rtconfig, increase the max value of "indexParams A_tcp_vol_size" by one.
2 In the script, add an extra string to 'tcpVolVals'. Could be anything. Perhaps a rude word. Just something to show the user.
3 In the rtconfig, add an extra entry to "paramPair tcp_VolSize" that is the actual pixel size you want to see as the result.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 01-29-2020, 05:57 AM   #3
lerian
Human being with feelings
 
Join Date: Oct 2011
Posts: 254
Default

Thank you WT, now i can finally have a layout with some balance between rec+label and volume size. My ocd is off now.

lerian is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.