• Advertisement
Sign in to follow this  

Request For Comments: My GUI

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

Hey all, Brief I'm developing a GUI, have been for a while, only recently did i get the early functionality fully working and so i would like your comments on what you think of it so far. Screenshot This is a screenshot of various windows. Code/Syntax This is the code that initialises the GUI and sets up the above window formation.
	pGuiController = new DXGController( DXGDevice( g_pd3dDevice ) );

	pClearFrame = new DXGClearFrame(	DXG2DVector( 0, 0 ),
										DXG2DVector( 512, 512 ) );

	pWindow1 = new DXGWindow(	DXGDevice( g_pd3dDevice ),
								DXG2DVector( 100, 100 ),
								DXG2DVector( 300, 300 ),
								D3DXVECTOR4( 0.0f, 0.0f, 0.0f, 0.4f ),
								D3DXVECTOR4( 0.0f, 0.2f, 0.2f, 0.6f ) );

	pWindow2 = new DXGWindow(	DXGDevice( g_pd3dDevice ),
								DXG2DVector( 50, 75 ),
								DXG2DVector( 300, 425 ),
								D3DXVECTOR4( 0.0f, 1.0f, 0.0f, 0.4f ),
								D3DXVECTOR4( 0.0f, 0.4f, 0.2f, 0.2f ) );

	pSubWindow1 = new DXGWindow(DXGDevice( g_pd3dDevice ),
								DXG2DVector( 0, 0 ),
								DXG2DVector( 70, 105 ),
								D3DXVECTOR4( 0.0f, 0.4f, 0.0f, 0.4f ),
								D3DXVECTOR4( 0.0f, 0.8f, 0.2f, 0.6f ) );

	pSubWindow2 = new DXGWindow(DXGDevice( g_pd3dDevice ),
								DXG2DVector( 50, 14 ),
								DXG2DVector( 300, 275 ),
								D3DXVECTOR4( 0.0f, 0.0f, 0.4f, 0.0f ),
								D3DXVECTOR4( 0.0f, 0.2f, 0.8f, 0.2f ) );

	pGuiController->SetRoot( pClearFrame );

	pClearFrame->AddChild( pWindow1 );
	pClearFrame->AddChild( pWindow2 );

	pWindow1->AddChild( pSubWindow1 );
	pWindow2->AddChild( pSubWindow2 );


Current Features The current capabilities of the GUI are: - Current controls: DXGBaseControl DXGBaseFrame DXGClearFrame DXGImage DXGWindow DXGLabel - Procedural Texture Generation - All of the textures used for those windows are procedurally generated. Any fades can be set and any border colours can be used. - All windows are clipped inside their parents. - All the windows are draggable. - When a control is interacted with it calls a handler function and passes information describing the interaction. To Be Included In the long run i intend to add all the controls available with other GUIs, buttons, list boxes, menus etc etc. I also intend to make the look and feel much more customisable. Now most of what i have done so far is trivial, but i hope you will agree that this is a pretty solid foundation for bigger and better things. I also hope that you will agree that the syntax for setting up the controls is easy to use. I was going to demo it with a video, but FRAPS uber-sizes things so i didn't bother. I would appreciate any comments and suggestions, i will also answer any questions. Thanks, Dave

Share this post


Link to post
Share on other sites
Advertisement
Do post when you have more. I like the visual style you have so far, syntax is indeed clear I agree. I have some questions.

How is the positioning handled exactly? I'm not very good at converting vectors + coordinates to something visual mentally... In my gui (which is dead at the moment, maybe will do it again) I had each widget position made relative to it's parent, which defines a viewport so to speak for it's children.

About the interaction with controls, does it mean you register a callback with a certain control, function pointers? How do you deal with unregistering?

Will you provide some serialization and / or a designer tool, or more generally speaking what will be the scope of your gui?


Share this post


Link to post
Share on other sites
Quote:
Original post by DeadXorAlive
Do post when you have more. I like the visual style you have so far, syntax is indeed clear I agree. I have some questions.

How is the positioning handled exactly? I'm not very good at converting vectors + coordinates to something visual mentally... In my gui (which is dead at the moment, maybe will do it again) I had each widget position made relative to it's parent, which defines a viewport so to speak for it's children.

About the interaction with controls, does it mean you register a callback with a certain control, function pointers? How do you deal with unregistering?

Will you provide some serialization and / or a designer tool, or more generally speaking what will be the scope of your gui?


Hi, thanks for the comments. I would like to state now that this GUI is more of a play around until i start my proper one. I am doing for my final year project at uni.

Position is in pixels and each control is an offset into its parent, relative to its parent.

Yes you do register a callback, unregistering is done through a function call. A function pointer is used.

For my final year project it is most likely to have a designing tool accompany it.

Dave

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement