wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 10-18-2009, 05:14 PM   #1
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default TextSplat

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: w3x TextSplat_1.3.2.w3x (82.1 KB, 106 views)

Last edited by Deaod : 07-17-2014 at 11:21 PM. Reason: Update to 1.3.2
Deaod is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-21-2009, 10:59 AM   #2
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

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)
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils


Last edited by Earth-Fury : 10-24-2009 at 09:48 PM.
Earth-Fury is offline   Reply With Quote
Old 10-21-2009, 04:45 PM   #3
Fulla
Evil Overlord
 
Fulla's Avatar
 
Join Date: Jan 2006
Posts: 1,416

Submissions (3)

Fulla has a spectacular aura about (79)Fulla has a spectacular aura about (79)Fulla has a spectacular aura about (79)

Default

A few screenshots / examples would be great if possible.
__________________
Fulla is offline   Reply With Quote
Old 10-23-2009, 09:05 PM   #4
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

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: gif TextSplat_SS.GIF (21.6 KB, 213 views)
__________________

Last edited by Deaod : 10-23-2009 at 09:07 PM.
Deaod is offline   Reply With Quote
Old 10-24-2009, 03:19 AM   #5
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Hmnn,

I approve this.

Makes me wish I was making a map to have an excuse to have cool font stuff..
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 10-24-2009, 05:17 AM   #6
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

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
__________________

Last edited by Deaod : 10-25-2009 at 12:06 AM.
Deaod is offline   Reply With Quote
Old 12-11-2009, 08:45 AM   #7
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

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)
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 01-18-2010, 04:16 PM   #8
GALLED
User
 
GALLED's Avatar
 
Join Date: May 2006
Posts: 95

Submissions (1)

GALLED has little to show at this moment (1)

Default

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

War of Gods
GALLED is offline   Reply With Quote
Old 01-18-2010, 10:17 PM   #9
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

call SetTextSplatVisibility(sometextsplat, GetLocalPlayer() == playeryouwantitvisiblefor)
Fledermaus is offline   Reply With Quote
Old 01-20-2010, 04:09 PM   #10
GALLED
User
 
GALLED's Avatar
 
Join Date: May 2006
Posts: 95

Submissions (1)

GALLED has little to show at this moment (1)

Default

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?
__________________
Actual Project:

War of Gods
GALLED is offline   Reply With Quote
Old 01-22-2010, 04:59 PM   #11
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

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 is offline   Reply With Quote
Old 01-23-2010, 11:50 AM   #12
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

Version 1.3.0
__________________
Deaod is offline   Reply With Quote
Old 02-24-2010, 11:29 PM   #13
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

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 Images
File Type: jpg textsplat problem.jpg (246.9 KB, 150 views)
Attached Files
File Type: 7z FontConvUpdated.7z (127.5 KB, 86 views)
__________________

Last edited by Ammorth : 02-25-2010 at 02:38 AM.
Ammorth is offline   Reply With Quote
Old 02-25-2010, 05:16 AM   #14
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

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 ^^'
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Old 02-25-2010, 07:14 AM   #15
Ammorth
I blink, therefore I am.
 
Ammorth's Avatar
 
Join Date: Sep 2006
Posts: 1,812

Submissions (10)

Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)Ammorth is a glorious beacon of light (461)

Default

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
__________________
Ammorth is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 07:09 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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