I have made a dialog window with a label in it but I cannot seem to find a way to center the text inside the label. I thought it would be something easy to do but I can't find any way to do it. Is there something I am missing or do I have to keep moving the label depending on the text size?
You can't do this specifically, but there's a nice work-around tutorial from FuzzYD here.
Actually you can!
See.. text can have a lot of different text styles.
Some text styles are center-aligned.
Not all of them however, to find out which texts are center-aligned download this file:
You can open it with the normal notepad.
Look for those styles with the
That's pretty cool, but it comes with the issue of not being able to chose what you want your text to look like, so the work-around is better if you don't like the style, at least until we learn how to make our own styles.
Huh? Text alignment is impossible? When did that happen?
One thing you can do, if you're stuck with no trigger solution at all, is to use the data editor. Pretty disgusting, but it could save your map. *Proceeds to use the data editor with utter horror*
Nice! I guess I could've received some knowledge for going through all the trash that is know as styles.
Ugh, something's wrong with editing posts, kept getting 404 errors :S
Anyway, there's a built-in set of styles that begin with "Mod" and they have every combination of size, align and weight possible. Examples of combinations:
Possible font sizes: 12 16 20 24 28 32 36 40 52 64
The only things you can't change are font family and vertical alignment.
For text align to work, you have to use Set Dialog Item Style to set the style for the whole block/label, not just wrap the text in style tags. It's like trying to set alignment to an inline element in HTML, wont work.
Centering dialog item text is definitely possible. You have to use "Set Dialog Item Style". "Text with Style" or using inline style tags does not work; the dialog item will ignore the alignment.
You'll also need a font style with a center alignment. I recommend setting up a custom style.
I've covered all of this in quite some detail here: http://forums.sc2mapster.com/resources/tutorials/17978-dialogs-really-great-looking-dialogs-part-2/
Pocket Warriors - A pokemon-style game with SC2 units and full banking. New demo coming soon!
You must login to post a comment. Don't have an account? Register to get one!