Archived

This topic is now archived and is closed to further replies.

dark_radeon

EventListener

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites