Jump to content
  • Advertisement
Sign in to follow this  

Portable GUI

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

I need some help. I´m planning to make my own GUI library to run in my games. Maybe something with windows like World of Warcraft but not if it´s too complicated. Can you guys give me some advice? Note: I´m using C++ and I dont want to use Win32 GUI because it wont be easily ported to a MacOS or Linux

Share this post


Link to post
Share on other sites
Advertisement
Well... you can use Gtk or something for actual GUIs. For in-game guis you could use something like Crazy Eddie's GUI library (CEGUI).

Share this post


Link to post
Share on other sites
Google for "Immediate Mode GUI" and you should find some good resources to get started. In particular this (fourth result of the Google search for me at time of posting) may be a good starting point, although you should find no shortage of other material on the subject.


Is there any particular reason you don't want to use an existing well-written and tested library rather than writing your own?

Share this post


Link to post
Share on other sites
Quote:
Original post by jbadams
Google for "Immediate Mode GUI" and you should find some good resources to get started. In particular this (fourth result of the Google search for me at time of posting) may be a good starting point, although you should find no shortage of other material on the subject.


Is there any particular reason you don't want to use an existing well-written and tested library rather than writing your own?


Is there any particular reason you are linking to an immediate mode GUI tutorial over an object-oriented approach?

Share this post


Link to post
Share on other sites
Quote:
Original post by Dave
Is there any particular reason you are linking to an immediate mode GUI tutorial over an object-oriented approach?
Firstly, it's often a much simpler and more appropriate way to write a GUI (particularly if you're just after something simple) for games.

Second, there's no real reason you couldn't use the immediate mode techniques as the basis of a more object oriented approach once you've learned how it works and played with it a bit.


Feel free to link to a resource or resources on OO GUI design if you feel they'd be more appropriate, I'm sure our original poster could evaluate both approaches and choose whichever he feels is more appropriate for his uses, and I wouldn't mind seeing some good resources on the topic myself if you've got anything in mind.

Share this post


Link to post
Share on other sites
There are actually very few resources on how to write UIs. People tend to try and resolve all the problems themselves (which isn't a bad way to learn). I have found very little in my time writing UIs and everything i have learned has come from personal experience.

One quick thing before i bring the thread back on topic is that i am yet to see talk in articles about IM GUIs that cover certain states. Also, from what i have read, it basically seems like you're shifting UI state from the UI to the game. If that is what they are trying to achieve then great, but i don't see why.

:)

Share this post


Link to post
Share on other sites
Quote:
Original post by Dave
Also, from what i have read, it basically seems like you're shifting UI state from the UI to the game. If that is what they are trying to achieve then great, but i don't see why.
You're certainly removing UI state from the widgets themselves - there's no reason you couldn't create some sort of object to manage that state though, or have it handled by the scene containing said widgets, or whatever is appropriate for how your game is organised. I have never seen such a thing done in articles on IM GUI techniques, and it may well move the design away from being an IM GUI to do so, but it's still a perfectly valid way to solve the problems at hand.

Share this post


Link to post
Share on other sites
Quote:
Original post by jbadams
Quote:
Original post by Dave
Also, from what i have read, it basically seems like you're shifting UI state from the UI to the game. If that is what they are trying to achieve then great, but i don't see why.
You're certainly removing UI state from the widgets themselves - there's no reason you couldn't create some sort of object to manage that state though


See for me that means that when you write you application you actually have to do more work to get the UI running. It just seems nicer to me to say "I want a button there Mr.UI, keep drawing it there until otherwise".

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!