Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Veery newbie question

Veery newbie question

Discuss PocketC for CE (including Desktop Edition)

Postby IndiQa on Fri Mar 02, 2001 10:03 pm

Greets all,

I have a real simple question but I sure can't figure it out.

I print a string to the screen. Background mode is transparent so you don't get the text box background clashing with the rest of the screen background. However when I update the text the new string overwrites the old one without removing the old one. So I end up with an unreadable blob at the text position. Works fine if I set the background to opaque but then it looks ugly with the different text background color.

How do I either set the text background to match the rest of the screen background in the opaque mode. Or clear the text and then write the new text to the same position in the transparent mode?

Thanks,

Curt
Ambient Spacemusic
http://www.mp3.com/IndiQa
IndiQa
 
Posts: 19
Joined: Wed Feb 28, 2001 11:33 pm
Location: USA

Postby ianf on Sat Mar 03, 2001 8:14 am

Hi Curt
Assuming you want to draw your own text ( ie: you don't want a windows text box cause you can't change it's font, size etc ) you need to clear away the previous text using a rectangle with the same pen color as the background. That's what I do & it works fine. I also use the text width function to work out how wide my next string is for positioning. Here's some of my code which is specific to my application but gives you a good lead. variable 'mes' is a string with the text in it already:-
setbrushattr(195,190,255);
setpenattr(0,2,0,0,80);
setbkmode(1);//1=transp.
settextcolor(10,0,0);
roundrect(264,185,615,215,5,5);
setpenattr(0,1,0,0,190);
roundrect(267,188,612,212,6,6);
setfontattr("Final Frontier",0,0,0,400,13,18);
x=textw(mes);
text(scr2x0+120-(x/2),191,mes);

Hope this helps
Ian
ianf
 
Posts: 92
Joined: Mon Dec 11, 2000 7:25 am
Location: United Kingdom

Postby IndiQa on Sat Mar 03, 2001 2:27 pm

Thank you Ian that works perfectly.

Regards,

Curt
Ambient Spacemusic
http://www.mp3.com/IndiQa
IndiQa
 
Posts: 19
Joined: Wed Feb 28, 2001 11:33 pm
Location: USA


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 2 guests

cron