User Input in FLTK

Dec 30, 2008 at 3:50am
While using FLTK graphics libraries for basic game writing how do you take user input? getch() doesn't really work since Visual Studios opens up a console window to run getch().

I know that the keyboard keys all have ASCII numbers with getch(), it's just that I only want to use my program's window to get it done.

Thanks for any input.
Dec 30, 2008 at 4:13am
This doesn't really belong here, but oh, well.

From what I can see here, FLTK is not a graphics library. It's a GUI library. Therefore, its input and output methods are the same as other GUI toolkits (the user can enter text in text boxes, click on buttons, etc.).

Perhaps you should read this: http://www.fltk.org/hig.php
Dec 30, 2008 at 4:42am
Hmmm... I don't think that quite helps that much. I know how to use a Text_box when someone needs to type something in, but I don't know how to just wait for the user to push keys in FLTK.
Dec 31, 2008 at 3:51am
Bump.
Jan 4, 2009 at 6:55pm
You can use a Windows32 API call to check the state of a key. This is the best method to use when doing game programming as it'll allow you to poll instead of handling callbacks.

http://msdn.microsoft.com/en-us/library/ms646301.aspx
Topic archived. No new replies allowed.