• Advertisement

Archived

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

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

Has anyone ever written a GUI class in Direct3d? I mean with buttons, maybe comboboxes, message handlers, etc. Could use some information The wisest men say: Keep it simple, stupid

Share this post


Link to post
Share on other sites
Advertisement
Try:

top nav of this site -> For Beginners

scroll down to the 2 articles titled:
writing a GUI in C++ and DirectX Part 1
writing a GUI in C++ and DirectX Part 2

dang if this site doesn''t have it all. get to know the Resources section of this site. it saves time.

-me

Share this post


Link to post
Share on other sites
I think its a royal pain in the ass frankly. Also that tutorial isn''t much use (no disrespect to the author!) IMO as most of us could figure out the theory pretty quickly, its actual coding implementation thats the fussy part which that article convieniently skips where its needed most.

I''ve created some classes that generate Windows-like controls (ie Edit boxes for user input) and it wasn''t necessarily totally difficult, but intricate to do right with loads of functionality and I''m paranoid about how it''ll function over a range of different setups.

I think in DX9 Microsoft should integrate support for common Windows controls (or official equivilents) into DirectX, so that we can save developers a lot of headaches and time.

On this subject, does anyone know of any public classes people have created and released on this subject? I''m curious as to how other people re-created the common windows controls in their Direct3D apps...

Share this post


Link to post
Share on other sites
I was researching integrating owner-drawn controls with DirectX (for an article), but unfortunately not all controls can be owner-drawn. Then I started looking at custom-drawn controls, and that had a lot of potential but deadlines crept up on me and I had to postpone that... I''ll see if I can pick it back up after next Friday.

I''ll let you know what I find.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
I have been writing an interface system that does exactly what you describe. However, I have some lofty goals for it and it may be a while before it gets done. It''s loosely based on the QT sdk. Right now it draws a bunch of rectangles and allows you to move, drag, etc.. - it''s stable but I had to pause and write a better rendering interface and.. well - you know how that goes...

My plans were to get the code complete, write some basic controls, implement the scripting system for testing, and then write all the articles/lessons for posting. However I am finding that this is a rather ambitious project and is going to take a more time. I didn''t realize there was a demand for this article so I''ll try to step up the pace a little.

#dth-0

Share this post


Link to post
Share on other sites
I''ve got such a system started, and it''s open source. If you want to help me develop it further email me and we can discuss what needs doing in detail. Right now it supports text labels, frames and icons, which merge together to create forms and buttons and there is an edit-line control. The messaging system needs fixing up, and it needs a form editor.

Cheers

Matt


Main site | Free source | Email

Share this post


Link to post
Share on other sites
It would be nice to look thru your code, as i''m doing some sort of helper classes for everybodyz to use :-D
The theory in those tutorials is everything i wanted actualy, thanks.



The wisest men say:
Keep it simple, stupid

Share this post


Link to post
Share on other sites

  • Advertisement