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

Author Topic: Minimap  (Read 1204 times)

0 Members and 1 Guest are viewing this topic.

TrueBeast

  • Newbie
  • *
  • Posts: 1
    • View Profile
Minimap
« on: April 06, 2019, 01:45:22 am »
Ive been trying to make a minimap, although when i use this code

sf::View minimap;
minimap.setViewport(sf::FloatRect(0.75f, 0.f, 0.25f, 0.25f));
m_window.setView(minimap);

it sets everything in the window to be the minimap.

So what im left with is a blank screen but a working minimap.

My question is, how do i get it to draw both the minimap AND the game at the same time?

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Minimap
« Reply #1 on: April 06, 2019, 02:01:09 am »
You have to draw them twice. Once on your game view, once on your minimap view.