program HowToDrawSimpleText; uses SwinGame,sgTypes; procedure Main(); begin OpenGraphicsWindow('Drawing Text' ,800 ,600 ); ClearScreen(); DrawText('You Win!!!' ,ColorWhite ,300 ,200 ); RefreshScreen(); Delay(5000 ); ReleaseAllResources(); end; begin Main(); end.
How To Draw Simple Text
In SwinGame you will often need to draw text to the screen to label something, show game scores or simply prompt the user for something. this beginner level how to explains how to draw text to the game window.
To draw basic text to the game window you need to stipulate four arguments. The 'Test to display', the Color and the X and Y position in the game Window you need to display the text.
Remember to use the American spelling of the word Color
- Create custom messages for your friends
- Create a story program, draw text then delay, clear the screen draw the next part of the story. Be creative use different colors for the background and text!