-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.pde
100 lines (86 loc) · 2.9 KB
/
gui.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
* @student.info
*<BR> Name: Quentin Truong
*<BR> Date: 5-17-13
*<BR> Period: 5
*<BR> Assignment: Slot Machine
*<BR> Description: Create a GUI for SlotMachine
*<BR> Cite Sources: None
*/
/* =========================================================
* ==== WARNING ===
* =========================================================
* The code in this tab has been generated from the GUI form
* designer and care should be taken when editing this file.
* Only add/edit code inside the event handlers i.e. only
* use lines between the matching comment tags. e.g.
void myBtnEvents(GButton button) { //_CODE_:button1:12356:
// It is safe to enter your event code here
} //_CODE_:button1:12356:
* Do not rename this tab!
* =========================================================
*/
public void slider1_change1(GSlider source, GEvent event) { //_CODE_:slider1:755963:
if (spinning == false && myCoins > 0 && slider1.getValueF() == 1.0)
{
initiate();
}
} //_CODE_:slider1:755963:
public void button1_click1(GButton source, GEvent event) { //_CODE_:button1:605109:
if (reelOne == true)
{
reelOne = false;
setPicsArray(0);
}
} //_CODE_:button1:605109:
public void button2_click1(GButton source, GEvent event) { //_CODE_:button2:607188:
if (reelTwo == true)
{
reelTwo = false;
setPicsArray(1);
}
} //_CODE_:button2:607188:
public void button3_click1(GButton source, GEvent event) { //_CODE_:button3:214785:
if (reelThree == true)
{
reelThree = false;
setPicsArray(2);
}
} //_CODE_:button3:214785:
// Create all the GUI controls.
// autogenerated do not edit
public void createGUI(){
G4P.messagesEnabled(false);
G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
G4P.setCursor(ARROW);
if(frame != null)
frame.setTitle("Sketch Window");
slider1 = new GSlider(this, 1335, 50, 750, 20, 10.0);
slider1.setRotation(PI/2, GControlMode.CORNER);
slider1.setLimits(0.0, 0.0, 1.0);
slider1.setNumberFormat(G4P.DECIMAL, 1);
slider1.setLocalColorScheme(GCScheme.GOLD_SCHEME);
slider1.setOpaque(false);
slider1.addEventHandler(this, "slider1_change1");
button1 = new GButton(this, 347, 834, 50, 40);
button1.setText("Push");
button1.setTextBold();
button1.setLocalColorScheme(GCScheme.GOLD_SCHEME);
button1.addEventHandler(this, "button1_click1");
button2 = new GButton(this, 726, 834, 50, 40);
button2.setText("Push");
button2.setTextBold();
button2.setLocalColorScheme(GCScheme.GOLD_SCHEME);
button2.addEventHandler(this, "button2_click1");
button3 = new GButton(this, 1105, 834, 50, 40);
button3.setText("Push");
button3.setTextBold();
button3.setLocalColorScheme(GCScheme.GOLD_SCHEME);
button3.addEventHandler(this, "button3_click1");
}
// Variable declarations
// autogenerated do not edit
GSlider slider1;
GButton button1;
GButton button2;
GButton button3;