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

Author Topic: GUI drawing  (Read 1706 times)

0 Members and 1 Guest are viewing this topic.

excentio

  • Newbie
  • *
  • Posts: 21
    • View Profile
GUI drawing
« on: December 11, 2014, 12:44:10 am »
hello guys, I have a question, how can I do something like glue GUI element to a current RenderWindow or current view ? I want that GUI to be a child of a view and I don't know how to do that, maybe you can guide me to the right path ?

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: GUI drawing
« Reply #1 on: December 11, 2014, 12:54:37 am »
Maybe take a look at what SFGUI does..

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: GUI drawing
« Reply #2 on: December 11, 2014, 12:55:11 am »
It sounds like you're asking for a "scene graph."  It's out of scope for SFML, but a common element of games and game engines so once you know that phrase it's easy to google a lot of detailed help on implementing them.  I believe there's one in the SFML Game Development book too.

If you were asking for GUI elements, what Jesper said.

excentio

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: GUI drawing
« Reply #3 on: December 11, 2014, 02:54:06 am »
It sounds like you're asking for a "scene graph."  It's out of scope for SFML, but a common element of games and game engines so once you know that phrase it's easy to google a lot of detailed help on implementing them.  I believe there's one in the SFML Game Development book too.

If you were asking for GUI elements, what Jesper said.
If I understanded correctly, I should create a Parent-child system and make GUI as a child and view as a root ?

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: GUI drawing
« Reply #4 on: December 11, 2014, 08:23:24 am »
Probably, yeah.

 

anything