Interfaces in DirectX

Started by
4 comments, last by B4 23 years, 11 months ago
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
Advertisement
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.
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.
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.
Just look at the DirectDraw Sample named "FSWindow" come with DirectX 6 SDK
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.

This topic is closed to new replies.

Advertisement