Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Blocking Key presses
Posts: n/a
Default Blocking Key presses - 04-24-2009, 02:04 AM

I have some events that call methods with keypresses. Is there a way to block keypresses while one method is running?

Reply With Quote
Senior Member
Status: Offline
Posts: 80
Join Date: Feb 2009
Location: Ohio
Default 04-24-2009, 08:46 AM

Use Booleans

make a variable called block_b make it = false

now in the method that you have called when you hit b put the code in

if block_b == false
code here
code if b is blocked here
Now when ever you wanna block b all you have to do is set block_b = true
  Send a message via AIM to Scott300 Send a message via MSN to Scott300  
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.