CodeBase - Simple example of conditions, loops, colors, shapes and variables (complete remarks)

Return to the CodeBase listing

Category: Miscellaneous

Version: 1.0

0
0

Information

Uploaded: 9th Feb 2006 20:48

Modified: 1st Jan 1970 01:00

Author:  Yskonyn

Summary

Simple example of how to make conditions give feedback on screen and learn to play with remarks, colors, shapes, variables, loops and IF statements.

Full Description

This little example draws a box on screen and checks for two conditions:<br /> 1) the mouse cursor needs to be over the box<br /> 2) the left mouse button needs to be pressed<br /> If both are true then the programs gives feedback in the form of changing color.<br /> The box changes to a green color indicating the action was correct.<br /> <br /> The program also shows how you can incorporate a simple counter.<br /> Every time you click on the box the counter add 1 unit to its amount.<br /> <br /> Feel free to play around with the code, expand on it and make funny variations.<br /> It's a good way to learn to play with various elements.

Comments

No comments yet.