3
« on: July 03, 2012, 09:57:51 pm »
Hi,
This is actually more of a design issue than an actual sfml one but any feedback would be appreciated.
Assuming window size is fixed, I want to create a "text box" with a custom border from an image. I see two ways of solving this. One is to just create a sprite of the correct size and draw that each frame, but this is likely relatively costly and the image itself would have to be modified if I decide to ever change the window size. The second option is to get a sprite sheet of small segments of the border such as vertical, horizontal, and edge pieces and then create the border programmatically. Once created, I want to keep this image as a whole to be drawn later. Is the best way to do this just coping these loaded images onto a master image?
Similarly what if I want to create a very dense menu, such as a player menu with complex layout. This menu will likely be too complex to break down into components. At this point the only solution I can imagine is just having the entire menu predefined and loading it as an image. Does anyone have a better method to implement this?