Re: [Plib-users] Newbee with puInput Trouble
Brought to you by:
sjbaker
From: Eero P. <epa...@ko...> - 2003-05-17 08:57:36
|
Fabricio Guzman wrote: > Hey Gang, > > I'm running the "Hello World" program for PUI with a > slight modification (I've added a puInput object). > The program compiles and runs but when I select the > puInput object and type away nothing shows up (the > cursor is present but doesn't move). Here's my > modified code from the "Hello World" program > (everything else is identical to the original > program): > You are propably missing the keyboard connection: You need functions like: static void glut_keyboard_func ( unsigned char key, int x, int y ) { puKeyboard(key,PU_DOWN); } static void glut_special_func ( int key, int x, int y ) { puKeyboard(key+PU_KEY_GLUT_SPECIAL_OFFSET,PU_DOWN); } and connect them to Glut before entering MainLoop like: glutKeyboardFunc(glut_keyboard_func); glutSpecialFunc(glut_special_func); Eero |