Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / A simple MultyLine Write function

Author
Message
=C=
20
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 22nd Jun 2003 17:03
A Very Simple Message Writer

This will chop one long line to smaller ones of a specified size and write it on screen at a specified x, y coords. It is very simple and works only on chopping lines up to a space character or limit given.

I am sure there must be more clever functions, probably a whole Write library out there but sometimes you just want something simple that does this sort of thing.

If anyone has any resources that provide functionality like this I could use for sure so please let me know...



This example does not handle repetition, you might want to write some more code, maybe return something from the function to signal that the message is writen (i suggest the chars)

so in the main code you can see if the chars > 0 then there is still more to write...
-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy
=C=
20
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 22nd Jun 2003 22:12
Alas,

It works as a plain test but in a real do...loop situation, it wont.

Sync on and Backdrop on seem to mess this code up.

you can try to set them off and on again before every call (even inside the function) but it wont have the desirable effect. It spoils the programm flow somehow...

oh well. I'll post a solution when I find one...

-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy

Login to post a reply

Server time is: 2024-04-23 16:08:00
Your offset time is: 2024-04-23 16:08:00