Showing Text with the WaitKey() command
Blitz3D Forums/Blitz3D Programming/Showing Text with the WaitKey() command
| ||
;Every time I use the Waitkey() command I cannot show text ;What I want is to SHOW text while using the command ;for example....I want the game PAUSE until a user presses a ;key, which I can already do, but I want TEXT to be shown ;while the game is paused......look at the example SeedRnd (MilliSecs()) Graphics3D 800,600 While Not KeyDown(1) a=a+1 Text 20,20,a If a=100;I want the screen to show "press any key to end the game" Cls Text 20,20,"Press anykey to end" ;the program does NOT show press anykey to end WaitKey() End EndIf RenderWorld Flip Cls Wend |
| ||
Call Flip before the Waitkey(), which will flip the buffers and make the text visible. |
| ||
Or draw it to frontbuffer if you want to leave the backbuffer unchanged. But dont forget to switch it back again! |