EventListener
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
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement