Re: [DOS] How to set different text_colors?
I think the below code is what your after,
I also would point you to EE Editor by David Cuny
EE has a .e file named keys.e that will allow to get the key
press number so you can specify what key will take you out of the loop..
Good Luck! euman at bellsouth.net
--BEGIN CODE
include graphics.e
constant SCREEN = 1,
TRUE = 1,
ENTER = 13
procedure user_input()
-- get user input from keyboard ---modified by Euman for example
object key
while TRUE do
key = get_key()
if key = ENTER then
exit
end if
if key = -1 then
else text_color( GREEN )
puts(SCREEN, key)
end if
end while
end procedure
text_color( YELLOW )
puts( 1, "Enter something here: " )
user_input()
-- END CODE
----- Original Message -----
From: "Sunraysia Psychiatric Centre" <sunpsych at MILDURA.NET.AU>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, November 05, 2000 10:11 PM
Subject: [DOS] How to set different text_colors?
> I'd be grateful for advice on coding to do achieve the following...
> 1 display a prompt message in, say, yellow (eg: "Enter something here:
> ")
> 2 echo user's response on screen in, say, green (eg "This is user's
> input")
>
> I've tried this, but can't get the green colour:
> ......
> text_color( YELLOW )
> puts( 1, "Enter something here: " )
> text_color( GREEN )
> user_input = gets( 0 )
> ......
>
> Thank you
>
> Alex Caracatsanis
>
|
Not Categorized, Please Help
|
|