Jump to content
  • Advertisement

Archived

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

B4

Interfaces in DirectX

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

I was wondering how it would be possible to add things such as scrollbars and textboxes in my DirectX application, is there an easy way to do it? Also, if there are any tutorials available that I don''t know about, I would be interested in reading those. Thanks. -B4

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Using Win32 Controls in a Direct X Application, if a game is crazy. They are much to slow. Writing your own is just about the only way to go, so if this is the case, don''t bother yourself with finding out.

Share this post


Link to post
Share on other sites
I''m not sure I understood that. Are you saying writing your own is the only way to go? If so, how would I do this, because speed will be an issue.

Share this post


Link to post
Share on other sites
Mason McCuskey has a series of articles here (on Gamedev.net in the programming resources) called "Developing A GUI Using C++ and DirectX." That might be a useful read.

Essentially the idea behind rolling your own interface components is to create images of your components in whatever states you might expect them to be in, then draw them, and handle input properly. Let''s say you have a button component. Have a pressed and an unpressed image. Normally draw the button pressed, but when a mouse click is detected in the area of the button, draw the pressed image. When the click ends, draw the unpressed image and send an appropriate message.

Share this post


Link to post
Share on other sites
Getting a simple windowing system up and running isn''t that hard. But you *have* to understand event-style programming. Win32 Programming by Petzold is a good place to start.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!