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

Reply
 
Thread Tools Display Modes
Old 03-22-2013, 12:23 PM   #1
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default Walter - do the Edge Attachments trip you up?

I am always running into problems with the Edge Attachments - encoding what I want into a series of 0s and 1s is proving difficult

So I have defined the combinations of anchor points as variables, such as:
Code:
;----------------------------------
set top_left         [0 0 0 0 0 0 0 0]
set TB_left          [0 0 0 0 0 0 0 1]
set top_LR          [0 0 0 0 0 0 1 0]
set expand          [0 0 0 0 0 0 1 1]
set bottom_left    [0 0 0 0 0 1 0 1]
set top_right       [0 0 0 0 1 0 1 0]
set TB_right        [0 0 0 0 1 0 1 1]
set bottom_right  [0 0 0 0 1 1 1 1]

; TB_ stands for "Top and Bottom"
;----------------------------------
Now I can have statements such as:
Code:
set master.tcp.fx	     w>120 + top_right [138 49 27 19]
...
set tcp.fx      h>120  w>110 + bottom_right [228 15 27 19] [0]
set tcp.fxbyp h>130  w>110 + bottom_right [228 33 28 19] [0]
They make the code much easier to read.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 03-23-2013, 02:09 AM   #2
ramses
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,231
Default

Clever, will have to try this. Thanks for sharing!
ramses is offline   Reply With Quote
Old 03-23-2013, 06:00 AM   #3
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

It gets better with the Reverse Polish Notation:

Instead of:
Code:
set tcp.solo w>74 [228  3 27 19 1 0 1 0]	 w>62 [215  3 27 19 1 0 1 0] 	h>65 w>46 [215 24 27 19 1 0 1 0] [0]
or ...
Code:
set tcp.solo w>74         + top_right [228  3 27 19]	\
                 w>62         + top_right [215  3 27 19] 	\
                 h>65 w>46 + top_right [215 24 27 19]    \
                                 [0]
I can use:
Code:
set tcp.solo + top_right w>74          [228  3 27 19]	\
                                 w>62          [215  3 27 19] 	\
                                 h>65 w>46  [215 24 27 19]   \
                                                  [0]
So, the Solo button is always anchored to the top right corner of the TCP and has 3 possible positions
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 04-10-2013 at 10:26 AM.
DarkStar is online now   Reply With Quote
Old 03-23-2013, 12:53 PM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

well that makes it perfectly clear: DarkStar is a genius! How brilliant!
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 03-31-2013, 12:56 AM   #5
foxAsteria
Human being with feelings
 
foxAsteria's Avatar
 
Join Date: Dec 2009
Location: Oblivion
Posts: 10,255
Default

stuff like this makes me go "do i really want to spend time learning to theme, or should i just take the plunge and learn to code?"
__________________
foxyyymusic
foxAsteria is online now   Reply With Quote
Old 01-11-2017, 08:16 PM   #6
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
Default

Bumping because this is very useful! Thanks, DarkStar!
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.
mikeroephonics 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 08:34 AM.


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