View Full Version : A short and simple custom GUI query...
Fry Crayola
05-18-2006, 12:41 PM
For my game, I'm going to develop the GUI myself, partly for the learning process but also so that I can tweak it entirely for my needs.
Anyhow, over the years I've often read posts on this and other forums about how creating your own GUI is pretty simple if you can get a certain few "basic" gadgets working well, as everything else is essentially an extension of these with a different look, or a combination of many. Or something. Sadly, a search isn't throwing up anything anywhere because I just can't find the right terms.
Basic gadgets. True or not, there are definitely basic gadgets that I ought to get working first. What would these be? The voice in my head is telling me it's Text Field, Button and Panel, from which I can grow pretty much anything. Is that right, or am I missing something?
Any tutorials on the net that might be useful would be appreciated. I'm coding using BlitzMax, so everything's done using the various drawing functions.
Cheers.
Artinum
05-18-2006, 02:43 PM
What about scroll bars (if you have lists)?
Cartman
05-18-2006, 03:04 PM
Since you are using blitzmax might I recommend purchasing IGLASS (http://www.blitz3dfr.com/phpfrench/content.php?content.46). Search the BlitzMax forums and you'll learn about it.
IGLASS is a library of controls that can be used to create user interfaces. I'm using it in my game right now, and love it.
The library is organized exactly as you describe in your post. Everything is a Widget that gets inherited and then added onto. With a little knowledge of Object Oriented programming, you can then expand the core objects into custom ones, for particular needs, or advanced objects that have new functionality.
ggambett
05-18-2006, 03:36 PM
I started with Button and Label, I believe - these do most of what I need. EditBox, ToggleButton, RadioButton, Slider and a couple more came later, as needed. Finally Table which does HTML TABLE-like layouts. I've also made pseudo-listboxes with a table filled with ToggleButtons but I haven't promoted it to a separate widget yet. I'd say make your widgets as you need them.
Fry Crayola
05-19-2006, 02:54 AM
Since you are using blitzmax might I recommend purchasing IGLASS (http://www.blitz3dfr.com/phpfrench/content.php?content.46). Search the BlitzMax forums and you'll learn about it.
IGLASS is a library of controls that can be used to create user interfaces. I'm using it in my game right now, and love it.
The library is organized exactly as you describe in your post. Everything is a Widget that gets inherited and then added onto. With a little knowledge of Object Oriented programming, you can then expand the core objects into custom ones, for particular needs, or advanced objects that have new functionality.
I toyed with the idea of purchasing iGlass. Something I may well do anyway purely as a "Plan B".
Essentially, creating one myself does give me a tiny little bit of satisfaction.
Still, while I'm here, how is iGlass? Is it very flexible - could I create a GUI such as the one used in Civilization IV, or Football Manager 2006, or any other such game? Is it fast? Does it use much memory? How skinnable is it?
Heck, it's only £12 so I'd not be at a loss. But writing my own remains a first priority. It's useful as a learning aid as well.
kjs335
05-19-2006, 03:21 AM
I highly recommend using existing GUI system rather than creating one.
You could spend that time for more improvement in your game.
You can have a look at CEGUI ( Crazy Eddie's GUI System )
Fry Crayola
05-19-2006, 10:39 AM
I've decided to take a plunge with iGlass, given its very cheap cost and good reports.
Worst case scenario - it's not suitable for what I want to do and I'll use it for something else.
But it will probably not come to that. It seems very fully featured and very, very well supported.
In the end something popped into my head. I'm using BlitzMax precisely to cut down on any issues I might have with things I know little about. If I was really so fussed about learning certain things instead of just going ahead with game making, I'd be coding in assembler. Or something.
Cartman
05-19-2006, 11:31 AM
You'll like using IGlass. It's very extensible and 99% of the code is there for you to change. It does take some time to learn how to change things, but like kjs335 said, it reduces your development time since everyone is looking for bugs,issues and improvements. Therefore you can spend more time working on your game and less on finding problems with the UI.
Also, since BlitzMax is still not complete yet, it helps to have someone who just concentrates on patching the library for you.
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.