Aligning text within text window...setting margins? (SOLVED)

Started by jfarwyke, Sun 24/05/2009 16:15:03

Previous topic - Next topic

jfarwyke

The text in my text windows is awfully close to the edge, and I was wondering if there is a way to set the margins. Since I recently imported a font I wanted, it looks much worse, but I didn't like it even with the default font and would like to adjust it somehow. I have found many threads concerning text windows, but none seem to address the issue of margins or alignment. Thanks.

Khris

You have to create a custom text window gui.
Then you can choose your own border images and thus make the margins as big as you like.

jfarwyke

#2
I've already made my custom text window. I used a transparent image to cover the border images. So then, does that mean, the larger the border images, the larger the margins? For my 8 border images there are 4 layout measurements: Height, Left, Top, Width.  They all seem to have inconsistent values. Do I need to increase all of them? For the image in the bottom center I tried increasing the height by 80, and there was no change at all.

EDIT: As far as I can tell, the top and left refers to the positioning of the image, such as distance from the top and left. I think the height and width is the actual size of each image. I just tried replacing my transparent sprite with a solid black one (the same color as my window), and still after changing the values of height and width, I don't see any change.

Just imported a larger sprite and I can see a dramatic change, however, my text remains closer to the bottom and left edges than the top and right. Would I then have to import slightly smaller sprites for those edges? Let me see...

Hmm, that looks a little weird. Well, I'll play with it some more tomorrow. Basically I just don't know if I'm going about this the long and wacky way so I just thought I'd ask you guys if you knew a simpler way. Thanks.

Khris

I've played around with this and imported eight 10x10 images.
The margin is slightly bigger, you can see this if you set the background color of the GUI to a color different from the images'.
When I changed the three top images to 10x5, all images got cropped to that size, independent of the dimensions in the GUI's properties table.
After changing the top-left one back to 10x10, the top-center and top-right image were moved down.

It looks like
a) all other images are cropped to the top-left image's dimensions if they're bigger
b) moved inwards if they're smaller.

jfarwyke

#4
QuoteIt looks like
a) all other images are cropped to the top-left image's dimensions if they're bigger
b) moved inwards if they're smaller.

Right, I've noticed that. I'm playing around with importing different sized sprites now, because my text is not centered but closer to the left bottom edges. However it produces a strange effect, indescribable really.

EDIT: Finally I've got it the way I want it. I've had to use 4 border images: 15x15 for the Left middle & bottom, 25x15 for the Bottom center, 22x15 for the Right bottom and center, and a transparent for the 3 tops. So if anyone runs into the same problem I have, here's the solution. Thank you Kris for pointing me in the right direction.
NOTE: Changing the dimensions in the GUI properties doesn't seem to produce any effect at all.

SMF spam blocked by CleanTalk