Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   new stuff for showimg text (https://forums.graalonline.com/forums/showthread.php?t=19263)

Warcaptain 12-20-2001 11:51 AM

new stuff for showimg text
 
i think the letter 'f' should be added for fitted, to fit the text on the screen by returning when needed.

this would be very useful for chat programs, menus, etc.

nyghtGT 12-20-2001 03:37 PM

Re: new stuff for showimg text
 
Quote:

Originally posted by Warcaptain
i think the letter 'f' should be added for fitted, to fit the text on the screen by returning when needed.

this would be very useful for chat programs, menus, etc.

indeed it is, thanx a lot ...

Xaviar 12-20-2001 11:17 PM

Re: Re: new stuff for showimg text
 
Quote:

Originally posted by nyghtGT

indeed it is, thanx a lot ...

Personally, I just want built in suport for wrapping text around when it overruns the screen...

joseyisleet 12-21-2001 01:05 AM

Ok, I don't know if this will work or not, but try something like this.

this.text = <yourtexthere>
this.text.SelStart = Len(this.text)
this.text.SelLength = 0

I wrote that in VB. I haven't tried it yet, but it may work. No clue.

Or try

this.text = Len(this.text)

I don't know if that'll work either, but you can try.

entravial 12-21-2001 01:45 AM

~AlphaFlame~

if (playerchats){
this.length=strlen(#c);
for(this.done=0;this.done<int(this.length/32)+1;this.done++){
setstring chatline#v(this.done),#e(this.done*32,32,#c);
}
}

Something like that? I haven't tested in graal editor, but that's the basic idea...

Warcaptain 12-21-2001 02:45 AM

yeah but that has a few flaws:


it doesnt take into affect the width of the font\letters, only the length of the text.

and if it wrapped automaticly wraps it no matter how many lines.

width of font\letters isnt scripted, so its impossible as is.

itd be very nice if stefan added a wrap option to showimg text

Cybnext_Design 12-21-2001 03:49 AM

I wrote a script like this for Xaviar. The only problem was, it messes up when you use lower-case letters. But if you want to see it, forum PM me or give me an IM at C Y B N E X T.

zell12 12-21-2001 03:53 AM

this would be nice so that ya wouldn't have to keep makins small messages, ya can just make one big one without making it go of the screen

Xaviar 12-21-2001 07:59 AM

Sure, you can script it, but I want hard-coded support for it...And Cybnext, it also went letter-by-letter, so it screwed up words on the end, I'm gonna re-do it

ShockwaveISTHEBEST 12-21-2001 08:42 AM

That would make things a lot simpler putting it into the real graal scripting commands. It would take one line instead of the 4 or 5 we have to use now.

Warcaptain 12-21-2001 11:39 AM

thats the point :)

Cybnext_Design 12-21-2001 03:01 PM

Quote:

Originally posted by Xaviar
Sure, you can script it, but I want hard-coded support for it...And Cybnext, it also went letter-by-letter, so it screwed up words on the end, I'm gonna re-do it
It worked for me, although it might depend on different screenwidths, so I guess that might of been the problem

nyghtGT 12-21-2001 05:16 PM

well the chat for my server allredy made text tha was over 42 charcters long everything after it it extracted and added to line t so itwould like like:

nyghtGT: blah blah blah Blah
blah bah blah
nyghtGT: testing ...
nyghtGT: testing ....

and so on ... this sorta helps, but like you guys have said... "it could be much better...."

btedji 12-21-2001 08:21 PM

This would be a pain but you could figure out what the actual pixel width of each letter and space is, but not a whole lot of people want to do that much work.

Xaviar 12-21-2001 11:24 PM

Quote:

Originally posted by Cybnext_Design


It worked for me, although it might depend on different screenwidths, so I guess that might of been the problem

Nah, the problem was that if you typed "Once upon a time, there were three little bears.", and the first e in three went over the char limit per line, it would wrap it around like this:

"Once upon a time, there were thr
ee little bears."

But don't worry about it, I can set up my own ;)

Warcaptain 12-22-2001 03:03 AM

Quote:

Originally posted by btedji
This would be a pain but you could figure out what the actual pixel width of each letter and space is, but not a whole lot of people want to do that much work.
still remember..

some fots are huge width\heigth

and some are very tiny.

and no way to determine the width of the individual character's width.


W
W
see difference in width?

zell12 12-22-2001 10:50 AM

but you can set the font on a chatting thing...

zell12 12-22-2001 10:54 AM

its something like:
showimg 202,@Copperplate Gothic Bold@buc@Menu,screenwidth/5+screenwidth/4,screenheight/4+screenwidth/45;


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

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