Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Color Themes and Icon Sets

Reply
 
Thread Tools Display Modes
Old 01-25-2020, 03:22 AM   #1
lerian
Human being with feelings
 
Join Date: Oct 2011
Posts: 442
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: 4,950
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: 442
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
Old 04-09-2021, 08:49 AM   #4
gapalil001
Human being with feelings
 
gapalil001's Avatar
 
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
Default

Quote:
Originally Posted by White Tie View Post
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.
thank you a lot! but.. what if need some checkmarks? use slider for on/off is looks wierd
gapalil001 is offline   Reply With Quote
Old 04-09-2021, 09:17 AM   #5
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
Default

IGNORE THIS THREAD

Since then Reaper has added this : Adding theme adjuster functionality to a theme without doing any scripting : HERE.

In answer to your question: no, you can't have a checkmark. Unless you want to write your own script, or find someone to write one for you, in which case then yes you can have anything you like.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 04-10-2021, 06:57 PM   #6
gapalil001
Human being with feelings
 
gapalil001's Avatar
 
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
Default

Quote:
Originally Posted by White Tie View Post
IGNORE THIS THREAD

Since then Reaper has added this : Adding theme adjuster functionality to a theme without doing any scripting : HERE.

In answer to your question: no, you can't have a checkmark. Unless you want to write your own script, or find someone to write one for you, in which case then yes you can have anything you like.
Thank you! That’s the way I am thinking about. I wrote to a few script authors but there is no answer seems like I must learn lua and create my custom adjuster.
gapalil001 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 04:40 PM.


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