Equal Spacing On Res Change Thread last updated on 2003-04-12 12:07:30

Posted by member 19820 on 2003-04-12 12:07:30

A theme I'm working on has a series of warf-like menus on the right side of the screen (shortcuts that toggle a menu of shortcuts with space in between). I wanted to line them up while keeping the spacing between them equal...no matter what the resolution was, so I came up with this:
$((((resolutiony-A*B)/(A+1))+B)*C)-B$
Where
A=the number of images to be aligned
B=the height of one of the images
C=the number of the image (the highest would be 1 the second would be 2 and so on)

I then added corner pieces which I did not want to be included in the calculation (to prevent overlapping) so I added "D" to get this:
$((((resolutiony-2D-A*B)/(A+1))+B)*C)-B+D$

Note that there is a "2D" in there because I had a corner piece on each end. My end result was this:
$((((resolutiony-760)/7)+100)*1)-20$

Not sure if this will help anyone, but I hope it gives you some ideas about how to make things more resindie. If anyone finds this interesting I may post a screenie for you to help you see what I'm trying to convey. Enjoy!