![]() |
Auto Resizing Text
There is obviously no way to shrink text automatically (or at least Loriel said)
I came up with this script, but it doesn't seem to want to work. I tried it with for at first, and when it wouldn't work I tried the while, which just happened to refuse. I reconnected a few times, disconnected and /npcstarted up my NPC Server (couldnt do it with cpanel, it wont work) and it still doesnt work.. any ideas? function showweap() { wraptext2 97,.5,@Verdana@b,#w; i=.5; // for (i=.5; !strequals(#w,#t(0)); i-=.01;) { while (!strequals(#w,#t(0))) { i-=.1; wraptext2 97,i,@Verdana@b,#w; } showtext 506,3,1,Verdana,b,#t(0); changeimgvis 506,8; changeimgzoom 506,i; // } timeout=.05; } |
Meh, I cannot see what you are trying to do :confused:
|
I got it working... I was attempting to make the text fit into a small box. For example, on kingdoms when your experience goes from 5 digits to 6, the text shrinks to fit it. It turns out that my NPC-Server is fussy and I had to take out the comments for some reason, then it worked...
|
how strange o.O
|
Quote:
NPC Code:if (strlen(#s(some.string))>5) changeimgzoom index,0.6; ??? |
Quote:
|
Quote:
|
I believe you're thinking of textwidth(). :)
BTW I suggested that and textheight to Stefan. I'm so flattered. ;) |
Quote:
|
Doubt it.:p
|
Quote:
|
As well as me, there's 3. Anyone else want to prove him wrong?
|
Oh well. XP
|
From newfeatures:
Quote:
|
textheight calculates the HEIGHT of the text. XiLe is trying to calulate the WIDTH of the text.
<3 big text |
All times are GMT +2. The time now is 04:10 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.