Author Topic: A generic Keypad class  (Read 3037 times)

0 Members and 1 Guest are viewing this topic.

Offline lskovlun

A generic Keypad class
« on: January 17, 2007, 04:06:54 PM »
Code in the attached file, along with documentation. Note that I use the ego view for buttons (as I said, I am not a graphic artist). The first the buttons from the left are number buttons, and add the numbers 1, 2 and 3 to the keypad text. The next button cancels, the one after that is backspace, and the last one OK. It would be great if someone would help me make better graphics for the demo code. Instructions are in the documentation. You will also need to add the word 'keypad' to your vocabulary.

Lars
« Last Edit: January 17, 2007, 04:14:59 PM by lskovlun »



Offline Collector

Re: A generic Keypad class
« Reply #1 on: December 19, 2010, 03:12:41 AM »
Does anyone have this file?
KQII Remake Pic

Offline MusicallyInspired

Re: A generic Keypad class
« Reply #2 on: December 19, 2010, 02:02:57 PM »
I don't even remember this...
Brass Lantern Prop Competition

Offline lskovlun

Re: A generic Keypad class
« Reply #3 on: December 21, 2010, 06:15:42 AM »
Does anyone have this file?
Here you go...

Offline lskovlun

Re: A generic Keypad class
« Reply #4 on: December 21, 2010, 06:26:02 AM »
Hmmm.... I just noticed a couple of bugs:

  • There is a memory leak in this code - I don't dispose the internal list used by the keypad. Look into the dispose and/or release methods.
  • It is not documented how to remove buttons, which you may want to do if you reuse the keypad object. The methods from the superclass EventHandler can be used for this (delete to remove a number of indicated buttons, release to remove all of them)

This is seriously old code, but I'll see what I can do about this.

Offline Collector

Re: A generic Keypad class
« Reply #5 on: December 21, 2010, 06:30:43 AM »
Thanks. I'll put it on the Wiki. It can be updated whenever you may get around to revising it.
KQII Remake Pic


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.098 seconds with 25 queries.