You can't do this specifically, but there's a nice work-around tutorial from FuzzYD here.
Development > Triggers
Center Dialog Label Text
- 8 posts
-
deathtorn Author
- Battle.net
- Deathtorn
- #779 NA
- Join date
- Aug 30, 2008
- Location
- Canada
- Reputation
- 0
- Posts
- 343
- Projects
- 1
- Last login
- May 24, 2013
-
s3rius Moderator
- Battle.net
- serius
- #707 EU
- Join date
- Apr 24, 2010
- Location
- Germany
- Reputation
- 8
- Posts
- 2,317
- Projects
- 1
- Last login
- May 01, 2012
Actually you can!
Somewhat.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:
http://www.mediafire.com/?th850qg99egcaqcYou can open it with the normal notepad.
Look for those styles with the
vjustify="Middle"
attribute.
Those work. -
deathtorn Author
- Battle.net
- Deathtorn
- #779 NA
- Join date
- Aug 30, 2008
- Location
- Canada
- Reputation
- 0
- Posts
- 343
- Projects
- 1
- Last login
- May 24, 2013
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.
Last edited Apr 14, 2011 by deathtorn -
Tolkfan Author
- Battle.net
- Aratar
- #418 EU
- Join date
- Jun 11, 2010
- Location
- Poland
- Reputation
- 13
- Posts
- 372
- Projects
- 2
- Team
- Last login
- May 25, 2013
Huh? Text alignment is impossible? When did that happen?
Last edited Apr 14, 2011 by TolkfanOne 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*
-
deathtorn Author
- Battle.net
- Deathtorn
- #779 NA
- Join date
- Aug 30, 2008
- Location
- Canada
- Reputation
- 0
- Posts
- 343
- Projects
- 1
- Last login
- May 24, 2013
-
Tolkfan Author
- Battle.net
- Aratar
- #418 EU
- Join date
- Jun 11, 2010
- Location
- Poland
- Reputation
- 13
- Posts
- 372
- Projects
- 2
- Team
- Last login
- May 25, 2013
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:
- ModCenterSize32Bold
- ModLeftSize20
- ModRightSize40
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.
-
jaminv Regular Shmoe
- Battle.net
- JManV
- #733 NA
- Join date
- Sep 15, 2010
- Location
- Andorra
- Reputation
- 6
- Posts
- 136
- Team
- Last login
- Jun 14, 2012
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!
- 8 posts
Demon4231 AuthorI 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?