On key press with variables

  • manjero
  • Born
  • Born
  • manjero
  • Posts: 2

Post 3+ Months Ago

I have 5 buttons. I want each one to be played from the keyboard with a key, but i need the specific key to each button to be a variable read from a txt file. I can load the file and store the variables but i can't pass a variable to On Keypress == variable...
any thoughts?

Thanks in advance,
Shahar Zrihen
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1252
  • Loc: Ro

Post 3+ Months Ago

why you need to pass it to onKeypress?
Load the variables, then add a Key listener (see Key class).
then test which key was pressed. And if it matches one from the file, do something.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.