EventListener

Started by
0 comments, last by dark_radeon 20 years, 9 months ago
out of curiosity, since i''m creating a console based action/rpg text rpg, is it possible to create an EventListener or something like the "MessageLoop" idea similar to the Windows Programming format...Because i want to be able to determine and monitor all sorts of input done in the client area by the user. -Zeke''''s Signature
-Zeke''s Signature
Advertisement
Yes, but you''ll have to do it old sk001. Rather then the WndProc way.


In your main loop, you''d have something like this
While(1)
.
.
.
IF(detect_keypress)
OnKeypress();
if(redraw)
OnRedraw();
if(UserEvent1)
OnUserEvent1();
if(exit)
OnExit();
.
.
.
loop


~~~~~
SNOBOL-If you succeed, shoot yourself in the left foot. If you fail, shoot yourself in the right foot.
Download and play Slime King I.
~~~~~Screaming Statue Software. | OpenGL FontLibWhy does Data talk to the computer? Surely he's Wi-Fi enabled... - phaseburn

This topic is closed to new replies.

Advertisement