Jump to content
  • Advertisement

Archived

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

dark_radeon

EventListener

This topic is 5560 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!