Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: GUI Building  (Read 2220 times)

0 Members and 1 Guest are viewing this topic.

Bocaj

  • Newbie
  • *
  • Posts: 32
    • View Profile
GUI Building
« on: July 21, 2012, 12:20:54 am »
How do most SFML users build a GUI?  Do they use some external GUI library, like Qt, or just use shapes and text, and wait for the user to click on them?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: GUI Building
« Reply #1 on: July 21, 2012, 12:28:07 am »
It completly depends on the size and needs for a GUI.
Qt is a good solution, if you don't want elements overlay the rendering section (e.g. no in game GUI). If you have just a few buttons then you most likely will write a small class on your own, otherwise if you want to use quite a few diffrent things (labels, buttons, slider, windows, etc.) then you most likly want to take a look at librarys explcitly build for SFML, like SFGUI or TGUI, or use some more generic libraries like libRocket or GWEN, for which you'll have to write your own little SFML renderer (except GWEN has one already). :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Bocaj

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: GUI Building
« Reply #2 on: July 21, 2012, 01:31:55 am »
If I were to make my own GUI system, should I use shapes and text for labels, buttons, slider, windows, etc.?  Or is there some better way?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: GUI Building
« Reply #3 on: July 21, 2012, 02:00:58 am »
That's completly up to you. 'Good' and 'bad' are defined only by you. ;)
The BREW renderer of SFGUI uses only shapes, lines and texts for rendering their GUI. This of course has its downside that you can't have nicely polished GUI elements. So use whatever makes more sense to you and is easier to implement while still fitting your needs. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything