Custom GUI

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Hey Guys,

      I have been working on a GUI for a map editor in school, and I am getting stuck on how to make some things like dialog boxes and file menu's, does anyone know of any books that teach about creating custom GUI's or any resources on it?
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • RE: Custom GUI

      What's the context? Is this 100% from scratch using C++ and DirectX?

      -Rez
    • From scratch using C++ and OpenGL, however the graphics API isn't nescessary as I am drawing my own boxes, text etc
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • Ahh yes, that can be a bit tricky. The basic idea is that you have a set of UI components that you build up in a tree structure to describe the entire user interface. This tree controls everything from Z-order to mouse click messages.

      As for reference, there aren't too many books that dig into the architecture of UI. Mike's User Interface chapter does a great job of talking about building UI. There's also a book called Game Programming Tricks of the Trade which is similar in format to Game Programming Gems. Most of the articles are pretty hit-or-miss and generally lack the street cred that Game Programming Gems has (I don't think any of the authors are professional game developers). There is one article on UI by Ernest Pazera that's pretty good called User Interface Hierarchies. Combine that with Mike's chapter on UI and you should have the pieces you need to write a reasonably complex UI system.

      It looks like you can find the book used for only a few bucks:
      amazon.com/Programming-Tricks-…Development/dp/1931841691

      -Rez
    • I do already have the whole heirarchy thing going, and it works good, especially when I want to drag a dialog box and need all the controls to go with it. However once getting into some of the more complex control's I am getting a little overwelmed, such as a file menu.

      I will dig around in that book, there is one for a dollar, really you can't beat that
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • Unfortunately, it doesn't get into the intricacies of building individual components. I don't know of any book that does. Most people use third-party libs.

      -Rez
    • You can also look directly in the D3D GUI framework - there are some good examples on how to code combo boxes, radio buttons, check boxes, text boxes, and all that. Start with the GCC4 code, and look at the Main Menu - then you can debug into the code and see how it works.
      Mr.Mike
      Author, Programmer, Brewer, Patriot