Hi, this is Tyler James, I sent you an e-mail a little bit back about beta testing. I am currently working on a game engine in C++/C# and am having some problems getting GUI in. I have tried using CEGUI, GLO, Allegro, even Windows Forms( ).

I was curious how exactly you go about coding GUI from scratch. Would you consider letting me in on some secrets? Or release a few code snippets demonstarting how it is done?

The control structure contains code about what type of control it is (button, check box, text box, combo box, list, image, custom, etc.), and it's various states.

You add controls to windows by specifiying the type of control and it's relative position to the window's origin. It's really not that conplicated, are you having trouble with the rendering aspects, or the logic/update aspects of the GUI system? I'll go into much more depth on whatever topic you want me to.

But yea, you just update the windows' logic 30 times a second, and render the windows after rendering all your 3D geometry.

- Danny_________________I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

I understand how the logic works, I have several methods such as UpdateGUI() that update the GUI controls/classes every tick functions based on deltatime, to esnrue the GUI doesn't lag the renderer.

I am not quite sure how to draw the created GUI control, or even create it. I mean, I can make the class with all the variables and such, but the actual object, like the title bar, buttons, how do you make them?

So yes, it is more of the visual representation of the GUI that I am having trouble with.

Cool. Well what I did was design a 512x512 version of each window style/skin and make it a layered .psd so it's easy to modify. Then I use the RECT structure to grab each part of the reference window and stretch it [if necessary, corners don't need to be stretched].

So you'll draw your background by pulling the 16x16 corners from the refernce image, stretch the 1x16 title bar section based on the width of the window, same with the 16x1 section of the vertical window. For the body of the window you'll just sample any area inside the reference window texture for the background color, and stretch it to the window size.

Also you can fill in the center areas of the reference window texture with each of the control types, & their different states. For the check mark have a un-checked, checked, and 'being checked' state, same for buttons, etc. and just use the RECT structure to grab the parts you're interested in [assuming you're using D3DXSprite to render your windows, but you can write your own RECT system very easily if you use OpenGL ].

Let me know if you get what I mean

- Danny_________________I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

Rect.top
Rect.left
REct.right
Rect.bottom_________________I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

I got my GUI system going fairly well now. I have draggable panels, skinnable panels, and buttons with text. All of which can be colored dynamically.

It is pretty sweet.

Cool, any screens?_________________I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

i dont know about anything choo nerds be talkin about in this damn topic..

the fuck is an RECT??

You know when you wake up in the mornign and you pitcha tent, that a 'RECT.

A RECT is a win32 structure that represents a rectangle in 2D space. Instead of storing the 4 absolute coordinates of the rectangle (requiring 8 floating point values, ie 1.0, 2.0, 3.0 to define the region), the RECT structure uses relative values from the top left corner of the rectangle, only requiring 4 floating point values ie: x, y, width, and height to represent a rectangular region.

I USE 'RECTS ALL THE TEIEM!!!11

- Danny_________________I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

i dont know about anything choo nerds be talkin about in this damn topic..

the fuck is an RECT??

You know when you wake up in the mornign and you pitcha tent, that a 'RECT.

A RECT is a win32 structure that represents a rectangle in 2D space. Instead of storing the 4 absolute coordinates of the rectangle (requiring 8 floating point values, ie 1.0, 2.0, 3.0 to define the region), the RECT structure uses relative values from the top left corner of the rectangle, only requiring 4 floating point values ie: x, y, width, and height to represent a rectangular region.