Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   Scripts (http://www.wc3c.net/forumdisplay.php?f=737)
-   -   TextSplat (http://www.wc3c.net/showthread.php?t=107989)

Deaod 10-18-2009 05:14 PM

TextSplat
 
2 Attachment(s)
Some of you might remember PitzerMike's TextSplat system. Well, this one does nearly the same his did (some features have been cut off, like gradients or monospaced textsplats or attaching a textsplat to a unit), but works with 1.24.
All features that have been cut off can be replicated with the API provided by this library.

So what exactly does this library do?
Well, it tries to replicate what texttags do, which is displaying text somewhere on the map, but has some additional features, which are outlined by the documentation.

This library uses vJass, ImageUtils, ARGB and Table.

A huge thanks goes out to PitzerMike, not only for the original incarnation of TextSplat, but also for the font i used for demonstration purposes.

Changelog

18/10/09 - Version 1.0.0
- initial release

23/10/09 - Version 1.1.0
- fixed a few problems related to hitting the op-limit
- fonts now have a parent, where unknown chars will be looked up (if you dont want a font to have a parent, simply input 0 into the font.create() method).

24/10/09 - Version 1.2.0
- fixed a bug related to previous fixes concerning the op-limit
- you can now display images (smilies, ...) inside text. Refer to the documentation of both libraries for detailed information
- optimizations.

25/10/09 - Version 1.2.1
- fixed images.
- some optimizations with eye on the op-limit.
- fixed an older bug related to using the .setPosition method.

23/01/10 - Version 1.3.0
- various optimizations
- added height member
- made Font compatible to 1.23a
- you cant destroy fonts anymore (anyone who did this should burn in hell anyway, i didnt maintain backwards compat)
- requires the latest version of ImageUtils, please update it.

28/02/2010 - Version 1.3.1
- fixed errors from ImageUtils popping up

18/07/2014 - Version 1.3.2
- rewrote the layout engine (if you want to call it that) to finally handle images in a way that makes sense
- fixed errors with weird interactions between text alignment and images



Expand Font Code + Credits + Documentation:
Expand TextSplat Code + Credits + Documentation:

Expand Font + Textsplat Demo:

NOTE: Fonts are prone to hitting the op-limit when initializing. For that reason i suggest you only initialize one font per library initializer, and only use the ASCII set of characters.

I attached a (really simple) demo map demonstrating basic usage of this library.

You might wonder why i split it up into two libraries (Font and TextSplat). Well, someone might want to remake TextSplat, but keep Font as a foundation, and i think its more readable that way. But i dont think the Font library has any use outside the context of a TextSplat library, so i combined those two.

Additional Fonts

Morpheus + Tooltip Images (by Earth-Fury)

If you have a font you want to share, contact me with a link to where you published your font and ill add it to this list!


Earth-Fury 10-21-2009 10:59 AM

2 Attachment(s)
Fonts for TextSplat

Morpheus:

Download: Attachment 46235
Source: www.dafont.com
Preview:
Zoom (requires log in)

Image Packs for TextSplat

Tooltip Resource Icons:

Download: Attachment 46242
Preview:
Zoom (requires log in)

Fulla 10-21-2009 04:45 PM

A few screenshots / examples would be great if possible.

Deaod 10-23-2009 09:05 PM

1 Attachment(s)
Version 1.1.0

fixed the problems Earth-Fury reported (thanks again!).

Attached a screenshot of the previous demo text.
I guess theres not much you can see.

The Demo script should demonstrate nearly every feature of the API (the only things missing are texttag compatibility things, nothing important).

Vexorian 10-24-2009 03:19 AM

Hmnn,

I approve this.

Makes me wish I was making a map to have an excuse to have cool font stuff..

Deaod 10-24-2009 05:17 AM

I just discovered a bug in the current version.

Will update soonish.

EDIT:

Version 1.2.0

Now with the ability to print out smilies.

EDIT2:

Version 1.2.1

Anachron 12-11-2009 08:45 AM

Thanks a lot for this library.
I will use it for my new CustomBar library version. (And for everything else which needs texts on ground)

GALLED 01-18-2010 04:16 PM

Can I use this system to display a different textSplat to each player? How can I do?

Fledermaus 01-18-2010 10:17 PM

call SetTextSplatVisibility(sometextsplat, GetLocalPlayer() == playeryouwantitvisiblefor)

GALLED 01-20-2010 04:09 PM

Quote:

Originally Posted by Fledermaus
call SetTextSplatVisibility(sometextsplat, GetLocalPlayer() == playeryouwantitvisiblefor)

Ok! Thanks!

I have another question:

Can I display a textSplat from a horizontal position of the camera? I do not know how to say it: RPG camera?

Deaod 01-22-2010 04:59 PM

Im sorry, but currently textsplats are tied to the ground. They cant go up into the air.
This is a hardcoded limitation, so theres nothing i can do about that.

Deaod 01-23-2010 11:50 AM

Version 1.3.0

Ammorth 02-24-2010 11:29 PM

2 Attachment(s)
Just ran the testmap and this is what happened...

I blame it on the characters ( ) [ ] and ` don't have enough of an alpha border to hide the glitches around the edges.

edit: Wrote a c++ application to generate a .j file from PitzerMike's FontConv applicationm that is compatible with the current textsplat version.
You can find it attached. Source code can be provided if anyone wants to see it.

Earth-Fury 02-25-2010 05:16 AM

Quote:

Originally Posted by Ammorth
Just ran the testmap and this is what happened...

I blame it on the characters ( ) [ ] and ` don't have enough of an alpha border to hide the glitches around the edges.

That is exactly the problem.

Quote:

Originally Posted by Ammorth
edit: Wrote a c++ application to generate a .j file from PitzerMike's FontConv applicationm that is compatible with the current textsplat version.
You can find it attached. Source code can be provided if anyone wants to see it.

I mayhaps should have posted my ruby script that does the same thing ^^'

Ammorth 02-25-2010 07:14 AM

Quote:

Originally Posted by Earth-Fury
I mayhaps should have posted my ruby script that does the same thing ^^'


Deaod gave me the ruby script, but I didn't want to install ruby runtime files, so I wrote this one instead =P


All times are GMT. The time now is 02:51 AM.

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services