HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Multiboard text and size

05-29-2009, 02:46 AM#1
Zandose
I have a multiboard in which you can change pages and each page has different text. Based on the longest text how do you find the percent for the multiboard size?
05-29-2009, 07:19 AM#2
midiway
There is no native to get it, you would have to test and find the widht for each page

BTW, the width of a multibaord is determined by the width of the first line
05-29-2009, 08:38 AM#3
FelSheep
WEU or JASS NewGen Pack may help.
05-29-2009, 09:49 AM#4
Av3n
http://www.wc3c.net/showthread.php?t=97876

That system should help you

-Av3n
05-29-2009, 10:09 PM#5
Zandose
Quote:
Originally Posted by midiway
There is no native to get it, you would have to test and find the widht for each page

BTW, the width of a multibaord is determined by the width of the first line
Could you please explain more.

Quote:
Originally Posted by FelSheep
WEU or JASS NewGen Pack may help.
Already using it.

Quote:
Originally Posted by Av3n
http://www.wc3c.net/showthread.php?t=97876

That system should help you

-Av3n
Not what I'm looking for. My think isn't a long thing of text, but multiple separate lines which cannot be moved to the next line.
05-30-2009, 07:04 AM#6
Ammorth
You could use the database of character sizes and write some function that will calculate the width of a given line.
05-31-2009, 04:30 PM#7
Zandose
Quote:
Originally Posted by Ammorth
You could use the database of character sizes and write some function that will calculate the width of a given line.
Having a little trouble understand it. Forgetting the special things (hex-colours, \n, etc), each letter is assigned a number (see example below), which I assume is its size or how much space it takes up. How does this translate into space usage? And, vs. the multiboard size.
Collapse JASS:
    set TableDown["a"] = 877
    set TableDown["b"] = 877
    set TableDown["c"] = 806
    ...
    set TableUp["A"] = 1219
    set TableUp["B"] = 961
    set TableUp["C"] = 1041
    ...
    set TableUp["`"] = 480
    set TableUp["~"] = 892
    set TableUp["!"] = 322
    ...
05-31-2009, 04:39 PM#8
Chocobo
problem is depending on your warcraft 3 language it will change the length of text
05-31-2009, 04:41 PM#9
Zandose
Quote:
Originally Posted by Chocobo
problem is depending on your warcraft 3 language it will change the length of text
That I understand. Each character (letter) takes up a different amount of space. I assume Ammorth's script uses some kind of measurement for each character, but I don't understand how it works.