-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntCount.cpp
More file actions
45 lines (38 loc) · 1.39 KB
/
IntCount.cpp
File metadata and controls
45 lines (38 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "IntCount.h"
IntCount::IntCount(sf::Vector2f size, sf::Vector2f position, sf::Font & font, std::string src_img, int size_font, sf::Color color_font, int val)
:counter(size, position, font, src_img, size_font, color_font)
{
_value = val;
setString(std::to_string(_value));
CenterText();
}
IntCount::IntCount(float size_x, float size_y, float pos_x, float pos_y, sf::Font & font, std::string src_img, int size_font, sf::Color color_font, int val)
:IntCount(sf::Vector2f(size_x, size_y), sf::Vector2f(pos_x, pos_y), font, src_img, size_font, color_font, val)
{
//Wywolanie przez liste wczesniejszego konstruktora
}
IntCount::IntCount(sf::Vector2f size, sf::Vector2f position, sf::Font & font, sf::Texture &src_tex, int size_font, sf::Color color_font, int val)
: counter(size, position, font, src_tex, size_font, color_font)
{
_value = val;
setString(std::to_string(_value));
CenterText();
}
IntCount::IntCount(float size_x, float size_y, float pos_x, float pos_y, sf::Font & font, sf::Texture &src_tex, int size_font, sf::Color color_font, int val)
:IntCount(sf::Vector2f(size_x, size_y), sf::Vector2f(pos_x, pos_y), font, src_tex, size_font, color_font, val)
{
//Wywolanie przez liste wczesniejszego konstruktora
}
IntCount::~IntCount()
{
}
void IntCount::increaseValue(int add)
{
_value += add;
setString(std::to_string(_value));
CenterText();
}
int IntCount::getValue()
{
return _value;
}