-
Notifications
You must be signed in to change notification settings - Fork 0
/
Loading.cpp
75 lines (56 loc) · 1.17 KB
/
Loading.cpp
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* File: Loading.cpp
* Author: scribble
*
* Created on March 26, 2013, 6:47 AM
*/
#include "Loading.h"
Loading::Loading() {
topAngle = 0;
bottomAngle = 360;
std::string bgImage = "LoadingBG.png";
background = bgImage.insert(0, IMAGE_PATH);
std::string topImage = "LoadingTop.png";
topRing = topImage.insert(0, IMAGE_PATH);
std::string bottomImage = "LoadingBottom.png";
bottomRing = bottomImage.insert(0, IMAGE_PATH);
}
Loading::Loading(const Loading& orig) {
}
Loading::~Loading() {
}
std::string Loading::getTopRing() {
return topRing;
}
std::string Loading::getBottomRing() {
return bottomRing;
}
std::string Loading::getBackground() {
return background;
}
int Loading::getTopAngle() {
return topAngle;
}
int Loading::getBottomAngle() {
return bottomAngle;
}
void Loading::setTopAngle() {
if (topAngle == 360) {
topAngle = 0;
}
else {
topAngle = topAngle + 15;
}
}
void Loading::setBottomAngle() {
if (bottomAngle == 0) {
bottomAngle = 360;
}
else {
bottomAngle = bottomAngle - 15;
}
}
void Loading::reset(){
bottomAngle = 360;
topAngle = 0;
}