View Single Post
Old 12-19-2019, 05:18 AM   #28
synkrotron
Human being with feelings
 
synkrotron's Avatar
 
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
Default

Quote:
Originally Posted by b0se View Post
Thank you! I'll finish the transport Photoshop mockup then give it a pop. Sweet.

BTW - do you know how to reorder elements? I'd like to swap the repeat button with the stop/pause bit. Repeat in between play and stop feels unintuitive to me, they're a universally mated pair :¬)
It's complicated...


The default theme WALTER code has to take into account that peeps want to play with how the transport sits in their preferred layout. So some will have it docked or floating. So that code kind of loses me.

If you know that you can get away with a fixed transport setup, always docked or floating and you are not faffing with the size of its window then you can do something similar to what I have done. I can post the code here if you like.

Of course, if you are offering your theme up for others to use then you have to somehow get your head around the default code.

The default code, allowing much tweaking by the user in REAPER, is something like 120 lines of code (not including comments and blank lines). My "fixed code" is just 22 lines of code.

Assuming you want to stick as much as you can to the default code, this is what you need to look at:-

Code:
	set trans.rew                	+ [sec_buttons sec_buttons] [size_rew size_rew size_rew size_rew]
	set trans.fwd                	+ + [trans.rew sec_buttons] [size_rew{2}] [size_fwd size_fwd size_fwd size_fwd]
	set trans.rec                	+ + [trans.fwd sec_buttons] [size_fwd{2}] [size_rec size_rec size_rec size_rec]
	set trans.play               	+ + [trans.rec sec_buttons] [size_rec{2}] [size_play size_play size_play size_play]
	set trans.repeat             	+ + [trans.play sec_buttons] [size_play{2}] [size_repeat size_repeat size_repeat size_repeat]
	set trans.stop               	+ + [trans.repeat sec_buttons] [size_repeat{2}] [size_stop size_stop size_stop size_stop]
	set trans.pause              	+ + [trans.stop sec_buttons] [size_stop{2}] [size_pause size_pause size_pause size_pause]
In order to move things around you have to remember to also change the text inside the square brackets to suit.

For instance, the location of the FWD button is linked to the location of the REW button currently. So in the square brackets for the FWD button, the position of the REW button is used in the calculation for its coordinates.

I did do this in an early experimentation before I started creating my own. This is the code for that:-

Code:
	set trans.rew                	+ [sec_buttons sec_buttons] [size_rew size_rew size_rew size_rew]
	set trans.fwd                	+ + [trans.rew sec_buttons] [size_rew{2}] [size_fwd size_fwd size_fwd size_fwd]
	set trans.stop               	+ + [trans.fwd sec_buttons] [size_fwd{2}] [size_stop size_stop size_stop size_stop]
	set trans.play               	+ + [trans.stop sec_buttons] [size_stop{2}] [size_play size_play size_play size_play]
	set trans.pause              	+ + [trans.play sec_buttons] [size_play{2}] [size_pause size_pause size_pause size_pause]
	set trans.rec                	+ + [trans.pause sec_buttons] [size_pause{2}] [size_rec size_rec size_rec size_rec]
	set trans.repeat             	+ + [trans.rec sec_buttons] [size_rec{2}] [size_repeat size_repeat size_repeat size_repeat]
You can see where I have changed the order of the buttons. Pay attention to the code using in each button's coordinate calculation.



I realise I've probably complicated things with all my typing there!

I hope it helps
__________________
Bandcamp // YouTube // SoundCloud
synkrotron is offline   Reply With Quote