-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestScene.pde
68 lines (52 loc) · 1.86 KB
/
TestScene.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
class TestScene extends SceneWithTransition {
ImageButton backButton = new ImageButton( "arrowDown.png", round(825 * widthRatio), round(997 * heightRatio), "arrowDown outline.png" );
//ImageButton samDoorsButton = new ImageButton( null, round(1132 * widthRatio), round(198 * heightRatio), "Hallway_2_Room Attic - Sam Door Overlay.png" );
//ImageButton parentDoorsButton = new ImageButton( null, round(461 * widthRatio), round(264 * heightRatio), "Hallway_2_Room Attic - Parents Door Overlay.png" );
PFont mono;
boolean textBoxDisable = false;
TextBoxWithFader textBoxWithFader;
TestScene() {
super("Test Scene.png");
// The font "andalemo.ttf" must be located in the
// current sketch's "data" directory to load successfully
//mono = loadFont("Gaiatype.ttf");
mono = createFont("Gaiatype", 32, true);
//textBoxWithFader = new TextBoxWithFader(0.4, 2);
//textBoxWithFader.textBox.setTextSize(32);
}
void enterState( State oldState )
{
super.enterState(oldState);
if (textBoxDisable == false) {
//textBoxWithFader.show();
textBoxDisable = true;
}
}
public void doStepWhileInState(float delta)
{
super.doStepWhileInState(delta);
backButton.display();
//samDoorsButton.display();
//parentDoorsButton.display();
fill(255);
textFont(mono);
text("word", 12, 60);
textSize(10);
text("word", 12, 80);
//float tSize = map(mouseY, 0, height, 1, 100);
//textBox.text = str(tSize);
//textBox.setTextSize(tSize);
//textBoxWithFader.display();
super.TransitionDisplay(delta);
}
void handleMousePressed() {
if ( backButton.isPointInside( mouseX, mouseY ) ) {
changeState( HALLWAY2_ATTIC_SCENE );
}
}
void changeState(State state) {
stateHandler.changeStateTo( state );
soundManager.FOOT_STEPS.play();
//textBoxWithFader.hide();
}
}