-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.cpp
More file actions
18 lines (16 loc) · 680 Bytes
/
map.cpp
File metadata and controls
18 lines (16 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "map.h"
Map::Map(int widthWin, int heightWin, int size, int thickness) : w(widthWin), h(heightWin), t(thickness), size(size), winOuter(sf::Vector2f(size+thickness, size+thickness)), winInner(sf::Vector2f(size, size))
{
winOuter.setFillColor(sf::Color::White);
winInner.setFillColor(sf::Color::Black);
winOuter.setPosition((widthWin - (size+thickness)) / 2, (heightWin - (size + thickness)) / 2);
winInner.setPosition((widthWin - size) / 2, (heightWin - size) / 2);
origin.x = (widthWin - size) / 2;
origin.y = (heightWin - size) / 2;
std::cout << origin << std::endl;
}
void Map::draw(sf::RenderWindow& window)
{
window.draw(winOuter);
window.draw(winInner);
}