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

Author Topic: Mapscrolling with static interface  (Read 2058 times)

0 Members and 1 Guest are viewing this topic.

Finn

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Mapscrolling with static interface
« on: August 24, 2010, 09:05:01 pm »
Hey
I wanted to know if there's a way to use a sf::View with just a few elements on the screen.
The thing is that I have a interface which should not be moved. But my interface is a little bit on the map as you can see here:
http://image-upload.de/image/hbbhFV/1ec8c0c14d.png

Suggestions?
Greets,
Finn

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Mapscrolling with static interface
« Reply #1 on: August 24, 2010, 10:39:44 pm »
Sure. You need 2 views. (one of them can be the default view)

- set view1
- draw your game
- set view2
- draw your interface

If you never move view2, your interface will never move.

Finn

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Mapscrolling with static interface
« Reply #2 on: August 24, 2010, 11:32:13 pm »
Ah thx...works perfect!
I think I just didn't get how views are supposed to use :D

 

anything