View Single Post
Old 05-18-2018, 08:33 AM   #3
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,982
Default

The complex combinators with the colon are described on the Walter SDK page. They only there as a convenient way of cleaning up code (they don't do anything special) and I've stopped using them myself because they always make my head hurt when I come back to my code.

Code:
+:val1:val2   --   val1*(first expression) + val2*(second expression)
They're annoying and it doesn't matter because you're using them wrong anyway Kill 'em, kill 'em all!

folderstate is very simple; its just a number; the number of folders deep the track is. So if you do:
Code:
 set button + [0 0 20 20] * [23 0 0 0] folderdepth
then your 20x20 button would be drawn at 0,0 and then bumped right by 23 pixels for each folder depth it was at. So, for a track 4 levels deep it would be:

Code:
 set button + [0 0 20 20] * [23 0 0 0] 4

--which is--

set button + [0 0 20 20] [92 0 0 0]

--which is--

[92 0 20 20]
folderdepth does this for the track in question
maxfolderdepth does this for the maximum folderdepth of any track in the project.


----

Also, I think mister happy is right; you don't need any folderstate business at all, so you can dump that too.
__________________
The House of White Tie
White Tie is offline   Reply With Quote