Re: New thread on ver4 topic

new topic     » goto parent     » topic index » view thread      » older message » newer message
dcole said...

I want to thank everybody for your help/support.

Many have suggested that I upload the program for test.

Problem is that it is a very long program with references to files in different drives on my computer.

So I've created this test program.

Here's one way to do it. I'm not aware of a way to draw on a screen that's not displayed, though on my machine, I don't even notice a flicker when it starts up. I ran this on Linux, but everything here should be cross platform.

include std/graphics.e 
 
cursor(NO_CURSOR)  
sequence screen = {0, 0} 
 
-- set up the screens 
clear_screen()  
text_color(GREEN)  
bk_color(WHITE)  
puts(1, "\nThis is page 0\n")  
text_color(BRIGHT_WHITE)  
bk_color(BLACK)  
puts(1,"Hit any key\n")  
screen[1] = save_text_image( {1,1}, {80, 25}) 
 
clear_screen()  
text_color(WHITE)  
bk_color(GREEN)  
puts(1, "\nThis is  page 1\n")  
text_color(BRIGHT_WHITE)  
bk_color(BLACK)  
puts(1,"Hit any key\n")  
screen[2] = save_text_image( {1,1}, {80, 25}) 
 
 
integer active_screen = 1 
while 1  do  
	clear_screen() 
	display_text_image( {1,1}, screen[active_screen] ) 
	wait_key() 
	active_screen = 3 - active_screen 
end while  

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu