• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

About texttags

Status
Not open for further replies.
Level 16
Joined
Aug 7, 2009
Messages
1,403
I've got things that I'd like to know about texttags:

1, the text you put into them sems to be automatically warped, but the number of characters in one line differs on different resolutions. Is there a way to control/disable this function?

2, I noticed that texttags have a maximum size, but by decreasing the font size I can display more characters - what's this limit, and is it possible to control it?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
minimum = 0
maximum = 0.6

I guess that is true only for one resolution.

I remember that with the same texttag size it was visible for the resolution X but not the Y one.

I don't think there is a native jass way to get which resolution is currently used.
Or at least it would require really creative and weird stuff and that wouldn't be instant. Maybe with camera and trackable (just a random idea)
 
Troll-brain is correct. You should use a string size library and wordwrap them yourself by making new lines become new texttags. My system is kind of old but: http://www.hiveworkshop.com/forums/triggers-scripts-269/small-code-snippets-40758/index26.html

I haven't found any methods to get resolution, but by default you should probably support sizes 1024x768 and above. Tukki made a system for Shadows of Everwood that allows you to input resolutions to make the wrapping a bit better, which is one solution you may want to look into.
 
Level 16
Joined
Aug 7, 2009
Messages
1,403
Troll-brain is correct. You should use a string size library and wordwrap them yourself by making new lines become new texttags. My system is kind of old but: http://www.hiveworkshop.com/forums/triggers-scripts-269/small-code-snippets-40758/index26.html

I haven't found any methods to get resolution, but by default you should probably support sizes 1024x768 and above. Tukki made a system for Shadows of Everwood that allows you to input resolutions to make the wrapping a bit better, which is one solution you may want to look into.

I was afraid of that. Self-wrapping the text was my last resort, but I really hoped there'd be a simpler, better solution. I guess I'll have to go with that - I'll most likely create a dialog and ask the players to input their resolutions.

Thanks for the replies.
 
Level 16
Joined
Aug 7, 2009
Messages
1,403
I think I got it work. The player will be asked to choose a resolution from the list (of supported ones), and according to their choice, the lines are manually wrapped. It's quite time consuming as I have to find the proper values for each resolution, but at least it seems to work.

I was quite mad when I wrote the last reply, but after calming down I finally solved it. It's still quite ugly as the lines could be like 30-40% longer, but oh well, we're talking about a Blizzard game, ain't we?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
To be more accurate you could play with the texttags sizes, display the lowest which is visible for each resolution( it has to be determined ofc), and the text of the texttag == resolution.
Then, the player can just choice the highest resolution he can see, he doesn't have to know which one he is currently using.
 
Level 16
Joined
Aug 7, 2009
Messages
1,403
They don't have to know their resolution now either, they can always go with 1024x768, that'll work perfectly, though each line will be relatively short. But I feel asking for the resolution is better than showing them some random numbers - after all, what kind of player doesn't know the resolution nor de aspect ratio they're using?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
It's not random numbers, plus you can still add a number prefix, such as "1) " , "2) " ...
The plan is to allow users to know easily and for sure which resolution they are using, but they can still choice an other one if they want.
And i'm pretty sure that casual players don't know which resolution they are using.
Now it's up to you, but i don't see any con for my suggestion.
 
Status
Not open for further replies.
Top