HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TextSplat

10-18-2009, 04:14 PM#1
Deaod
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!

Attached Files
File type: w3xTextSplat_1.3.2.w3x (82.1 KB)
10-21-2009, 09:59 AM#2
Earth-Fury
Fonts for TextSplat

Morpheus:

Download: Morpheus.7z
Source: www.dafont.com
Preview:
Zoom (requires log in)

Image Packs for TextSplat

Tooltip Resource Icons:

Download: Tooltip Icons.7z
Preview:
Zoom (requires log in)
Attached Images
File type: jpgPreview.jpg (51.3 KB)
10-21-2009, 03:45 PM#3
Fulla
A few screenshots / examples would be great if possible.
10-23-2009, 08:05 PM#4
Deaod
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).
Attached Images
File type: gifTextSplat_SS.GIF (21.6 KB)
10-24-2009, 02:19 AM#5
Vexorian
Hmnn,

I approve this.

Makes me wish I was making a map to have an excuse to have cool font stuff..
10-24-2009, 04:17 AM#6
Deaod
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
12-11-2009, 07:45 AM#7
Anachron
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)
01-18-2010, 03:16 PM#8
GALLED
Can I use this system to display a different textSplat to each player? How can I do?
01-18-2010, 09:17 PM#9
Fledermaus
call SetTextSplatVisibility(sometextsplat, GetLocalPlayer() == playeryouwantitvisiblefor)
01-20-2010, 03:09 PM#10
GALLED
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?
01-22-2010, 03:59 PM#11
Deaod
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.
01-23-2010, 10:50 AM#12
Deaod
Version 1.3.0
02-24-2010, 10:29 PM#13
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.

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.
Attached Files
File type: 7zFontConvUpdated.7z (127.5 KB)
02-25-2010, 04:16 AM#14
Earth-Fury
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 ^^'
02-25-2010, 06:14 AM#15
Ammorth
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