|
|
|
12-29-2021, 12:34 PM
|
#1
|
Banned
Join Date: Dec 2018
Posts: 642
|
Toolbar icons for multi-state toggles with 3 or more states?
The toggle state of any ReaScript action may be set using
Code:
reaper.SetToggleCommandState
I understand that for simple two-state toggles, one creates a 30x90 icon image inside of which there are three 30x30 images representing the off, hover, and on states, and that 30x90 icon image is placed in the Data/toolbar_icons folder inside the REAPER resource directory, and is assigned to the corresponding toolbar command in the reaper-menu.ini file as follows: icon_0=some_30x90_icon_file.png
item_0=_ACTION_NAME Action description
The reaper.SetToggleCommandState API function, however, allows you to set the state to any integer, which allows you to have multi (i.e. more than two) state toggles.
How, then, do you assign additional toolbar icon images to those additional states? (PLEASE do not respond to me about two-state toggles, which I already understand and have already explained here.)
|
|
|
01-04-2022, 06:32 PM
|
#2
|
Banned
Join Date: Dec 2018
Posts: 642
|
This thread has close to 6000 views since its creation just a few days ago! Wow! Based on its popularity, and obvious importance, I hope we hear from @Justin and @schwa soon.
|
|
|
07-09-2022, 07:20 AM
|
#3
|
Banned
Join Date: Dec 2018
Posts: 642
|
Quote:
Originally Posted by cohler
The toggle state of any ReaScript action may be set using
Code:
reaper.SetToggleCommandState
I understand that for simple two-state toggles, one creates a 30x90 icon image inside of which there are three 30x30 images representing the off, hover, and on states, and that 30x90 icon image is placed in the Data/toolbar_icons folder inside the REAPER resource directory, and is assigned to the corresponding toolbar command in the reaper-menu.ini file as follows: icon_0=some_30x90_icon_file.png
item_0=_ACTION_NAME Action description
The reaper.SetToggleCommandState API function, however, allows you to set the state to any integer, which allows you to have multi (i.e. more than two) state toggles.
How, then, do you assign additional toolbar icon images to those additional states? (PLEASE do not respond to me about two-state toggles, which I already understand and have already explained here.)
|
Bump.
|
|
|
12-31-2022, 09:53 AM
|
#4
|
Human being with feelings
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,637
|
+1 would be great
|
|
|
12-31-2022, 01:22 PM
|
#5
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,336
|
Quote:
Originally Posted by MonkeyBars
+1 would be great
|
It is not FR and the thread is not in FR forum. Cohler was just asking how to do it.
|
|
|
12-31-2022, 01:49 PM
|
#6
|
Human being with feelings
Join Date: Feb 2016
Location: Hollyweird
Posts: 2,637
|
Quote:
Originally Posted by vitalker
It is not FR and the thread is not in FR forum. Cohler was just asking how to do it.
|
Oh whoops! Anyone know if it's possible?
|
|
|
12-31-2022, 02:19 PM
|
#7
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,336
|
Quote:
Originally Posted by MonkeyBars
Oh whoops! Anyone know if it's possible?
|
I doubt that. The documentation says:
Quote:
boolean reaper.SetToggleCommandState(integer section_id, integer command_id, integer state)
Updates the toggle state of an action, returns true if succeeded. Only ReaScripts can have their toggle states changed programmatically.
|
All of the above claim that it is not possible. And Actions doesn't support anything, but on and off.
|
|
|
12-31-2022, 05:32 PM
|
#8
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Only on and off is supported, though buttons can have a third state valled "armed" when right clicking a button.
It's probably possible to set it to armed state but would mean it's armed for additional functionality.
I never used armed actions so I have no clue about them and don't know, if the buttons get colored to armed.
|
|
|
01-01-2023, 03:07 AM
|
#9
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,336
|
Quote:
Originally Posted by Meo-Ada Mespotine
Only on and off is supported, though buttons can have a third state valled "armed" when right clicking a button.
It's probably possible to set it to armed state but would mean it's armed for additional functionality.
I never used armed actions so I have no clue about them and don't know, if the buttons get colored to armed.
|
Armed is just on state, but you can use left click instead of shortcuts. And yes, the button is colored.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:20 AM.
|