View Single Post
Old 10-27-2016, 06:11 AM   #5
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,563
Default

There seems to be so much confusion about this folder indent business, let me try to clear the mist a bit.

Step one would be to delete all your code related to folderdepth and margins. All of it. Now add the non-walter (so : no 'set' command, and by convention I stick this in the header of the rtconfig) command tcp_folderindent and make it a value, say 20. This isn't walter so it can't be changed per layout. Your folders will now indent. If you don't want to change the folder indenting in other layouts, or line things up, you are done. Go to the pub.

Getting fancier, what if you want to line an element up, so that it appears in the same place horizontally across tcp tracks of different folder depth? Well, then obviously you need to move that element to the left when its track depth increases.

Code:
set tcp.solo [0 0 10 10]
becomes...

Code:
set tcp.solo + * folderdepth [-20] [0 0 10 10]
Note there that the -20 is the negative of the tcp_folderindent I chose. I have to type that in rather than reference it because, as I said, tcp_folderindent isn't walter.

Now, we probably don't want it interfering with the folder indent images like that, so we want to move them all to the right by the greatest distance they'll need to be for the maximum folder height, so it becomes...

Code:
set tcp.solo + + * folderdepth [-20] * maxfolderdepth [20] [0 0 10 10]
Here's those three stages:


Clearly we don't want to type all that walter in for every element, so we can make it a varible that we can add on to things if we want them lined up.

Code:
set lineup_anchor + * folderdepth [-20] * maxfolderdepth [20] 
set tcp.solo + lineup_anchor [0 0 10 10]
And there you have it. Things line up, things don't line up, not a single mention of tcp.margin, and super easy to dubug walter.
__________________
The House of White Tie
White Tie is offline   Reply With Quote