View Single Post
Old 01-12-2013, 09:17 PM   #30
shillingworth
A Predatory Creeper
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 251
Interface Author - Click to view interfaces
Default

Well I think I have it how the FrameTemplate works but not certain.

What the FrameTemplate is doing currently is:
- Draw TopLeft and TopRight while measure their rectangles, then fill the space between with Top. Use the maximum height out of those three (if present) to adjust the Middle rectangle's top edge downward.
- Draw the BottomLeft and BottomRight while measure their rectangles, then fill the space between with Bottom. Use the maximum height out of those three (if present) to adjust the Middle rectangle's bottom edge upward.
- Draw the LeftTop and LeftBottom while measure their rectangles, then fill the space between with Left. Use the maximum width out of those three (if present) to adjust the Middle rectangle's left edge rightward.
- Draw the RightTop and RightBottom while measure their rectangles, then fill the space between with Right. Use the maximum width out of those three (if present) to adjust the Middle rectangle's right edge leftward.
- Adjust the Middle rectangle edges based on the four Overlap values, then fill the rectangle with Middle.
- Return that rectangle to the UI piece being drawn as it's area for it's contents to draw into.

The part I'm not sure about:
- The Right pieces start at the right-most edge, then move leftward based on their Width. This means if any of the right pieces are smaller (width-wise) than the others, it'll be aligned on the right edge.
- Same as above with the Bottom pieces against the bottom-most edge.

I couldn't remember if the Right pieces align to the right edge of the middle or right edge of the frame. Nor whether the Bottom pieces align to the bottom edge of middle or bottom edge of frame.
__________________

"Computers are like Air Conditioners, they stop working properly when you open Windows."
shillingworth is offline   Reply With Quote