Computer Science Canada Disabling certain sections of the screen |
Author: | tristanbryce7 [ Tue Jan 15, 2013 1:06 pm ] |
Post subject: | Disabling certain sections of the screen |
I am trying to make it so that, i have four boxes (using drawbox) on the screen, and only one box is correct, so if the user clicks a wrong box (mousewhere), it draws a "wrong" picture, and also blacks out the box (drawfillbox). Now i want it so that if they click the same box again, nothing happens, how would I do that? |
Author: | Tony [ Tue Jan 15, 2013 2:22 pm ] | ||
Post subject: | RE:Disabling certain sections of the screen | ||
how are you making it do "not nothing" (show code)? The typical approach is
|
Author: | tristanbryce7 [ Tue Jan 15, 2013 3:23 pm ] | ||||
Post subject: | Re: Disabling certain sections of the screen | ||||
Well, I am using mousewhere inside a loop, so if they click it again it would execute again its basically a quiz, and they have 4 options, and each box is an option, so if they don't click the right one, i want to just "disable" that set of co-ordinates so if they click there again (no matter how many times they do, (excluding the first time, in which it says "Wrong" and draws a Pic of a big X) the program doesnt do anything
so say that they click on the third option, and it turns out to be wrong, i want it it so that they remain in the loop, but now that statement which says
is unactive. I was thinking of somehow being able to make it false using booleans, b/c my friend said I should try that, but I don;t know how to make a bunch of co-ordinates "false" |
Author: | Tony [ Tue Jan 15, 2013 3:50 pm ] | ||
Post subject: | RE:Disabling certain sections of the screen | ||
where option_three_active is your boolean variable with the appropriate value set. |
Author: | tristanbryce7 [ Tue Jan 15, 2013 3:58 pm ] |
Post subject: | Re: Disabling certain sections of the screen |
So then should i also make option_three active false afterwards? like .. and option_three_active then Pic.Draw (picWrong, 50, 210, picCopy) option_three_active := false ... ? |
Author: | Tony [ Tue Jan 15, 2013 5:52 pm ] |
Post subject: | RE:Disabling certain sections of the screen |
exactly! |
Author: | tristanbryce7 [ Tue Jan 15, 2013 6:16 pm ] |
Post subject: | Re: Disabling certain sections of the screen |
Thanks man!! |