I need help with displaying text using the objects - TV Text and VGA text.
I need help with displaying text using the objects - TV Text and VGA text.
I know how to display text but what I would like is to display "color text" that is colored letters.Individual letters to be in different colors but not changing the background color.I would like the back ground color to remain "Blue".
I am strictly a spin user and not a ASM user.
Thanks
Siri
[noparse][[/noparse]Subject Added By Moderator]
Post Edited By Moderator (Chris Savage (Parallax)) : 5/27/2008 3:53:33 PM GMT
I know how to display text but what I would like is to display "color text" that is colored letters.Individual letters to be in different colors but not changing the background color.I would like the back ground color to remain "Blue".
I am strictly a spin user and not a ASM user.
Thanks
Siri
[noparse][[/noparse]Subject Added By Moderator]
Post Edited By Moderator (Chris Savage (Parallax)) : 5/27/2008 3:53:33 PM GMT

Comments
$0C = set color (color follows)
So your text might look like this..
text.str(string($C,5,"COLOR TEXT",13))
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange
Post Edited (Oldbitcollector) : 5/27/2008 4:00:33 PM GMT
The code you suggested also changes the background color.What I am looking for is to change the color of individual
letters.
Siri
(Perhaps someone will jump in)
You might take a look at the AiGeneric driver which does have
the ability to change up to 16 colors. The default color for the background is black,
but I don't see why that couldn't be changed easily.
propeller.wikispaces.com/AiGeneric
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange
If you take a look at the TV_Text object you will find the colour palette definitions.....
' fore back ' color color palette byte $07, $0A '0 white / dark blue byte $07, $BB '1 white / red byte $9E, $9B '2 yellow / brown byte $04, $07 '3 grey / white byte $3D, $3B '4 cyan / dark cyan byte $6B, $6E '5 green / gray-green byte $BB, $CE '6 red / pink byte $3C, $0A '7 cyan / blueAll you need to do is set up another palette in your top level object, like this for example, a modified TV_Text_Demo :-
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 OBJ text : "tv_text" PUB start | i 'start term text.start(12) text.setcolors(@mypalette) text.str(string(13," TV Text Demo...",13,13,$C,5," OBJ and VAR require only 2.8KB ",$C,1)) repeat 14 text.out(" ") repeat i from $0E to $FF text.out(i) text.str(string($C,6," Uses internal ROM font ",$C,2)) repeat text.str(string($A,16,$B,12)) text.hex(i++, 8) DAT ' fore back ' color color mypalette byte $07, $0A '0 white / dark blue byte $9B, $0A '1 brown / dark blue byte $9E, $0A '2 yellow / dark blue byte $04, $0A '3 grey / dark blue byte $3D, $0A '4 cyan / dark blue byte $6B, $0A '5 green / dark blue byte $BB, $0A '6 red / dark blue byte $3B, $0A '7 dark cyan / dark blueYou use the command text.setcolors to change to your own Palette definitions.
Have fun!
Best regards,
Coley
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite
Thank you very much.I will make my own palette as you suggested.
I was playing witgh the "setcolors" command but had no idea· that I had to make my own palette to get the color combination I really
wanted.
Thanks once again.
Siri