Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 07-06-2019, 10:47 AM   #1
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default WalterTheme&API: Custom Buttons, Textfields, Sliders, etc.

Time and again, I run into the wish of having the ability to add my own custom-buttons/sliders/etc to my theme.
For instance, I have a set of vst-plugins, that I would love to load by clicking a button on a track or add other nice and important stuff to the Transport-panel.
Especially with the new scripting-possibilities using the theme-layout-functions and the massive changes for Reaper v6, this would be another killer customize feature.

How I think it could be done.

Theme
You can add, let's say, up to 32 custom-elements to a Theme-element.
In the rt-config, a button and a caption could be added to a track like:
Code:
 tcp.custom1 "button" x y w h
 tcp.custom2 "caption=This is a button" x y w h
 tcp.custom2 "slider=minval,maxval,default,stepsize" x y w h
So it's
themelement.customxxx "type of element like button, slider, etc" x y width height

themeelement is the usual themeelements Walter supports like mcp, tcp, trans, etc

This could be themed as all other theme-elements(buttons, captions), but with the difference, that they're not "linked" to a feature/an action by default.

Set and Action to this theme-element
Now, how can we trigger scripts/actions. For that I would suggest to treat them like shortcuts.
So I go into the ActionList-window, select an action, select AddShortcut and when the dialog opens which asks for the shortcut, you click on the custom-element(in our case, the clickable button).
So everytime the button gets clicked, it will run the associated action with it.

Scripting/coding the action behind the theme-element
Now, how to program the scripts behind that.
I would suggest a new function "get_action_context2", which returns:
custom_theme_elementname - like tcp.custom1
object_id - the track/obejct number, in which one clicked the button/etc.
min_value - the minimum value for this element
max_value - the maximum value for this element
current value - 0,1 for buttons, min_value to max_value for buttons

With that, this could be codeable in a quite extensive way and would help us tons.


This is my current idea, how this could be done, but I'm open for better ones that could do things even easier for devs, scripters, themers and users.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 03-31-2020 at 03:31 PM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-02-2019, 08:53 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Ping.


(Pong)
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 03-31-2020, 03:31 PM   #3
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Bumperoni
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 03-31-2020, 04:31 PM   #4
tdc
Human being with feelings
 
Join Date: Oct 2019
Location: Sydney
Posts: 471
Default

Quote:
Originally Posted by mespotine View Post
Bumperoni
I was looking around the theme info only just last night for something like this!

Would be fantastic!
tdc is offline   Reply With Quote
Old 04-19-2020, 06:01 PM   #5
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

+1 and bumpalicious
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 04-22-2020, 11:00 AM   #6
Distressor
Human being with feelings
 
Distressor's Avatar
 
Join Date: Mar 2017
Location: Berlin
Posts: 151
Default

I've been hoping for something like this for years now.

+1
Distressor 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 09:45 AM.


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