-
Notifications
You must be signed in to change notification settings - Fork 0
/
MasterAltDisplay.pde
76 lines (70 loc) · 1.65 KB
/
MasterAltDisplay.pde
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
76
class MasterAltDisplay
{
int x = MAP_WIDTH + ALT_DISPLAY_MARGIN;
int y = ALT_DISPLAY_MARGIN;
int width = SCREEN_X -(MAP_WIDTH + (ALT_DISPLAY_MARGIN*2));
int height =(MAP_HEIGHT + MAP_MAP_SLIDER_BOUNDARY_MARGIN - (ALT_DISPLAY_MARGIN*2));
AltDisplays[] displays;
Graph graph;
public InfoPanel moreInfo;
//this class acts as a container for the rest of the displays. These are the graph and the more info box
MasterAltDisplay(ArrayList<Location> locations, VariableButtons buttons, Slider slider)
{
displays = new AltDisplays[2];
graph = new Graph(this, locations, buttons, slider);
moreInfo = new InfoPanel();
displays[0] = graph;
displays[1] = moreInfo;
}
void draw()
{
if(infoButton.getPressed() == false) noStroke();
else stroke(255);
stroke(255);
strokeWeight(3);
rect(x, y, width, height, 20);
if(infoButton.getPressed() == false)
displays[0].draw();
else
displays[1].draw();
}
// a method to return the x value of the box to the user
int getX()
{
return this.x;
}
// a mthod to return the y value of the box to the user
int getY()
{
return this.y;
}
// a method to return th width of the MasterAltDisplay to the user
int getWidth()
{
return this.width;
}
//A method to return the height of the master alt display to the user
int getHeight()
{
return this.height;
}
int getXTwo()
{
int result = 1325;
return result;
}
int getY2()
{
int result = 39;
return result;
}
int getWidthOfBox()
{
int result = getXTwo() - getX();
return result;
}
InfoPanel getMoreInfo()
{
return moreInfo;
}
}