GUI for DirectX

Started by
6 comments, last by ibolcina 21 years ago
Hi. I would like to make nice front end for my D3D game. I need buttons, textfields,labels, scrollers,... I have come to conclusion that I have to rewritten everything. Message pump, base component class,event handling, layout managment, base components and compound components. How could this be in year 2003? Can someone share GUI code? Does anybody know any such library? If I cant find anything, I am sure as hell giving away my gui code when it will be in some decent state, because this is a real shame. bye,ivan
Advertisement
quote:Original post by ibolcina How could this be in year 2003?


Because noone has written it. Frankly, it is not that easy - in comparison to the standard windows components, GUI components under Dx are required to be VERY customisable in their look (like Java Swing) because they are normally used in an environment where "individual look is it" - i.e. the game.




Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)
RegardsThomas TomiczekTHONA Consulting Ltd.(Microsoft MVP C#/.NET)
http://www.gamedev.net/reference/articles/article994.asp
http://www.gamedev.net/reference/articles/article999.asp
http://www.gamedev.net/reference/articles/article1000.asp
http://www.gamedev.net/reference/articles/article737.asp
I recently started a GUI based on those documents. All I have is something that creaes colored windows but it seems pretty organised and I dont mind posting it. The new font X object looks as if it will be reallyuseful for the later parts.
I''ve written a pretty decent GUI using OpenGL, that I may port to DX in the near future. It supports windows and objects (command button, list box, labels, text boxes, and you can add your own objects VERY easily). You can draw the windows in multiple colors, images, have a desktop image. The title bar is PART of the window, so you can place objects and stuff right on there (as well as put different images/etc on different windows). The code isn''t perfectly organized and commented, but I will be able to make it into a library, and you can simply include the headers (and by just having the headers + lib, you can inherit my base object class, and make your own objects if you''d like, without needing my sources). It is currently resolution inependant (everything is based on 1000x800 screen resolution, and scaled approprietly for the actual resolution), but I may remove that if I port to DX.
Look under GUItest


[edited by - JoeyBlow2 on January 30, 2003 11:42:04 AM]
Thanks for posting your code.

I am in the process of building a DX-based GUI and having another example is a big help.

Todd
I suggest taking the game state route.


- Rob Loach
Current Project: Upgrade to .NET and DirectX 9
Percent Complete: X%
Rob Loach [Website] [Projects] [Contact]

This topic is closed to new replies.

Advertisement