Jump to content
  • Advertisement
Sign in to follow this  
Tamior

Interface Panel

This topic is 4830 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

'lo guys :). Now I have a following question. What would be the best way to implement an interface pannel, so that it is not in the world window. And since it doesnt need to be updated and rendered as often as the game does should I copy it's pixel area and just redisplaying it the next frame when it doesn't need updating? And also there are parts of it that need not be updated at all (i. e. its background). Generally speaking what are the main tricks of making a good interface panel (nice tutorials on the web are also welcomed)? Thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement
Use something along the lines of MVC (Model-View-Controller).

In the setters for the number of lives and things (the model), call the code to redraw the interface panel. Also redraw on paint() or expose() (whatever terminology you use).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I assume you are using DirectX lib in your game. You can call Present () with the second parameter (the 'Dirty' region) filled by a RECT structure that need to be updated each frame. The area outside dirty area will not be updated, so you may draw your interface panel one time only. Each time Present () function is called, it will bypass your interface panel.
Isn't that right ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!