Dos Command line options
Should i use bk_color(BLACK) and text_color(WHITE) at the begining of my=
=20
program?
Does the user dos colors (text and backgroud colors) affects my program=20
if i don't use the above functions?
What should i do to restore the user settings, if i got to use those=20
functions?
Here is my program (or a beginning of it):
-- LCDTest.ex
-- LCD Test Program v1.0
-- Copyright (c) 2003 Samuel Louren=87o
without type_check
-- Include
include extra.e
include get.e
include graphics.e
-- Declare
constant COLORS =3D {RED, GREEN, BLUE}, SCREEN =3D 1
integer key
clear_screen()
puts(SCREEN, "LCD Test Program v1.0\nCopyright (c) 2003 Samuel=20
Louren=87o")
puts(SCREEN, "\n\nWarning: This program will load 640 x 480, 16-colour=20
pixel-graphics mode.\nPress CTRL+Q to quit or ENTER to continue...")
while 1 do
key =3D wait_key()
if key =3D 13 then
if graphics_mode(18) then
puts(SCREEN, "\n\nError: Could not load 640 x 480, 16-colour=
=20
pixel-graphics mode.\nPress any key to escape...")
pause()
clear_screen()
else
for i =3D 1 to 3 do
bk_color(COLORS[i])
pause()
end for
def_graphics_mode()
end if
exit
elsif key =3D 17 then
clear_screen()
exit
end if
end while
pause() is the same as null =3D wait_key, and def_graphics mode is the=20
same as null =3D graphics_mode(-1).
|
Not Categorized, Please Help
|
|