-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPicker.cpp
60 lines (44 loc) · 977 Bytes
/
Picker.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
/*
* File: Picker.cpp
* Author: scribble
*
* Created on March 25, 2013, 4:42 AM
*/
#include "Picker.h"
#include "PickerButton.cpp"
Picker::Picker() {
}
Picker::Picker(const Picker& orig) {
}
Picker::~Picker() {
}
Picker::Picker(int _x, int _y, int _width, int _height){
x = _x;
y = _y;
width = _width;
height = _height;
std::string _imagePath = "PickerBG.png";
imagePath = _imagePath.insert(0,IMAGE_PATH);
}
std::string Picker::getImagePath() {
return imagePath;
}
int Picker::getX() {
return x;
}
int Picker::getY() {
return y;
}
int Picker::getWidth() {
return width;
}
int Picker::getHeight() {
return height;
}
bool Picker::pointInsideArea(Point *point) {
//point has to be inside frame. could be changed but overlaps may occur
if ((point->getX() > x) && (point->getX() < width + x) && (point->getY() > y) && (point->getY() < height + y)) {
return true;
}
return false;
}