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

Author Topic: View inside a view  (Read 2129 times)

0 Members and 1 Guest are viewing this topic.

TechRogue

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
View inside a view
« on: March 12, 2011, 03:24:17 am »
I feel like this is ridiculously easy, but I haven't been able to think of how to do it.

Is there a way to embed a sf::View inside another? I'm working on a GUI and this would make it so much easier to handle scrollable widget views, drop-down boxes, tabs, etc.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
View inside a view
« Reply #1 on: March 12, 2011, 01:31:42 pm »
You can't have a view inside a view, but you can have a drawable inside a drawable. This is usually a good solution to render hierarchical widget elements.
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
View inside a view
« Reply #2 on: March 12, 2011, 01:40:38 pm »
TechRogue, are you sure you're not refering to clipping instead of the views?

TechRogue

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
View inside a view
« Reply #3 on: March 12, 2011, 07:05:52 pm »
Not sure...I was hoping to be able to use the scrolling functionality of a view without using it as a camera, if that makes sense. Basically I need to handle widget positions, when to draw each one, and how much to draw.

If it's not possible it's not a big deal. I'll just need to do a little more work on my own. :D

 

anything