Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-11-2008, 12:33 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
wraptext2

Hi,

is there a way to say to wraptext2 that it shouldnt break words?

like

test test test test test

should be

test test test
test test

instead of

test test test tes
t test
__________________
Reply With Quote
  #2  
Old 06-11-2008, 12:49 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Tolnaftate2004 View Post
PHP Code:
font "verdana";
style "";
fontsize $pref::graal::defaultfontsize/gettextheight(1,font,style);
tokens wraptext2(40,fontsize," ",font "@" style "@" player.chat); 
This will most accurately split at words and fit into your space. $pref::graal::defaultfontsize is a placeholder for the height in pixels of how tall you want the text to be. Change to your liking.
That should work.
__________________
Reply With Quote
  #3  
Old 06-11-2008, 02:12 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
uhm, put space as delimeter? :o

PHP Code:
temp.msg "Test tessst asfusaububs iasubdiubdasiub sdijb ijbbaiusbdsijbb";
temp.msg wraptext2(<width in pixels>, <zoom>, " "temp.msg); 
or something like that

Oh, and clientside only ;o
__________________
Reply With Quote
Reply


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

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

Forum Jump


All times are GMT +2. The time now is 09:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.