Need an NSTextField that would display any input (including shift, cmd, arrows...)
Need an NSTextField that would display any input (including shift, cmd, arrows...)
- Subject: Need an NSTextField that would display any input (including shift, cmd, arrows...)
- From: Alexandre Aybes <email@hidden>
- Date: Sun, 7 Apr 2002 18:53:19 -0700
Hi there,
I am writing a little game, and I am doing the controls setup
using cocoa, because this is easier and faster.
I need to display a dialog that will prompt the user to enter
the controls. The way it works right now is as follows:
There is a button on the left and a textfield next to it, when
you click on the button (On/Off toggle), the textfield is
enabled and the text in it selected. Now, what I need is to be
able to put in there any key, like the arrows or the shift key,
typically whenever a key is pressed I want to be able to do some
work, display the key, mark the field as not editable, toggle
the button... etc...
My current guess is that I would have to subclass NSTextField
for that, is that correct? and if it is, what method(s) should I
override to provide this functionality.
The next step will be to be able to get mouse clicks as well in
there, because the fire button could be the mouse button, any
ideas?
Any idea, help, pointer would be greatly appreciated.
Thanks a lot!
Alex.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.