Re: help requested
The flickering (rain) you indicate is caused by the printf command in
graphics mode being called very rapidly. I modified your code to return
from orologio if the seconds had not changed yet. In this way, the watch
is printed only once per second, which will also give your program more
time to do other things.
include graphics.e
atom i
sequence s,coordinate
i=graphics_mode (18)
-- cursor(NO_CURSOR) --needed in text mode
coordinate= {{2,78},{2,75},{2,72},{3,72},{3,75},{3,78}}
atom prev_sec
prev_sec = 0
procedure orologio()
s = date()
if prev_sec = s[6] then
return
else
prev_sec = s[6]
end if
for i=1 to 6 do
position((coordinate[i][1]),(coordinate[i][2]))
printf (1,"%02d",s[i])
end for
end procedure
while get_key() != 27 do
orologio()
end while
i=graphics_mode(-1)
_______ ______ _______ ______
[ _ \[ _ ][ _ _ ][ _ ]
[/| [_] |[/| [_\][/ | | \][/| [_\]
| ___/ | _] | | | _]
[\| [/] [\| [_/] [\| |/] [\| [_/]
[_____] [______] [_____] [______]
xseal at harborside.com ICQ:13466657
http://www.harborside.com/home/x/xseal/euphoria/
|
Not Categorized, Please Help
|
|