Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Creating a GUI library. Anyone interested?

Author
Message
xix psycho xix
11
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 9th Feb 2012 19:56
Ok guys, the GUI library that I was working on is coming together nicely. It uses sprites to detect collision and has a similar design to C# Forms (similar, not exact. I will provide documentation hopefully!!!). If I can get enough people to be interested in the code I will work heavily on this and provide it on this thread . Let me know if a GUI library is something that people would be interested in! BTW if this is against forum rules I'm sorry just delete this thread!
xix psycho xix
11
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 9th Feb 2012 22:32 Edited at: 9th Feb 2012 22:38
For an idea of what this library will be like, here is a sample class that I created using it:



If anyone would like more info feel free to ask me!

Edit: To call this menu from your code, just use



Now the subclass BasicGui defines a function Display that should not be modified. This function runs a menu loop that will freeze the program from any other processing during the menu time other than menu handling ActionListeners (taken from Java haha) are just function pointers. ActionListeners that are defined within classes should be declared as static members as shown. Non-class functions should NOT by good practice be used, but can be used due to the fact that C++ pretty much lets you do whatever you want lol. Again, more info, contact me. Thanks for looking and showing interest!
Mr Bigglesworth
11
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 10th Feb 2012 01:03
This looks very useful, keep up the work.
xix psycho xix
11
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 10th Feb 2012 15:43
I have a few images and will soon be ready to release a library (I think ) So far the GUI can make buttons, labels, and lists. Here are the screenshots of what I have so far:




Sorry I have never posted links to this site before so again if against forum rules please let me know what I did wrong and what I need to do. Thanks!!

Attachments

Login to view attachments
TechLord
16
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 12th Feb 2012 20:00 Edited at: 12th Feb 2012 20:02
Quote: "If I can get enough people to be interested in the code I will work heavily on this and provide it on this thread . Let me know if a GUI library is something that people would be interested in!"

Hi xix psycho xix,

Developing a GUI is great way to understand complex Game Development. That's exactly how I started. GUI gadgets requires similar interactions to other game entities, vice-verse. In fact, If you think about it the entire 3D game world is a Graphical User Interface (if not, it should be). So regardless if anyone shows interest, proceed with its development.

xix psycho xix
11
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 12th Feb 2012 22:43
Haha wow I'm kind of embarrassed to show what I have now lol. Mine is much more basic than that, just provides some simple interface objects. Buttons, static text, lists, checkboxes. Haha the lists don't even have the little side button; you right click them to select the next item and left click them to select the previous item; rather, the user adds this functionality with the ActionListener. I started a complete redesign from the code I originally showed. Support will be included for developers to use images to represent the control rather than text. I still have alot of work to do, and guys if you want a GOOD graphics library go w/ techlords!! LOL!
Hawkblood
10
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 15th Feb 2012 01:23
If you really want to write your own GUI, please do. It's something every game (almost every game) needs. Your games will vary in the amount of GUI needed, and in what type/style. I suggest not only making a GUI system, but also make an editor for the GUI so making each one is easier and takes up less of your game code. I did that with mine:
http://forum.thegamecreators.com/?m=forum_view&t=178271&b=22
It's a little out of date, but just by looking at the image, you could get the idea of how I made the editor. The toughest part of the GUI, I think, is making a fast text-edit function.

The fastest code is the code never written.

Login to post a reply

Server time is: 2019-12-13 21:02:44
Your offset time is: 2019-12-13 21:02:44