[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] UI: Window Borders



One feature I like in a UI is the ability to use custom frames for windows. I did a version of this feature before, inspired by the frames from "Chrono Cross," especially the wooden one. (<http://www.rpgclassics.com/shrines/psx/cc/frames.shtml>)

My version is kind of ugly though. Two themes for it are shown in these old shots.
<http://kschnee.xepher.net/pics/darkside060717.jpg>
<http://kschnee.xepher.net/pics/shiningsea060629-0.png>


These use tiny GIFs (eg. 32x8) and just tile them along the edges of a window, then draw four corner pieces. So if a top piece is 10 pixels wide and the window is 103 pixels wide, 3 pixels of an 11th segment get drawn. If someone wants to use big obvious patterns, though, that effect would look bad. Is there an obvious better way of handling window borders? I could stretch whatever frame pieces are provided, but that'd cause distortion. Of course there's the option of not using fancy picture borders, but that's more limited than I'd like.

Kris