-
Notifications
You must be signed in to change notification settings - Fork 0
/
IntroScene.qml
55 lines (48 loc) · 1.31 KB
/
IntroScene.qml
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
import QtQuick 2.13
import Qt3D.Core 2.13
import Qt3D.Render 2.13
import Qt3D.Input 2.13
import Qt3D.Extras 2.13
import "logic.js" as Logic
Scene {
id: scene
property Scene nextScene
onActiveChanged: console.log("Intro | onActiveChanged: " + active)
Entity {
ExtrudedTextWrapper {
id: textMesh
text: "YOOO! Intro here"
depth: 1.0
horizontalAlignment: Text.AlignHCenter
ambientColor: "#FF00FF"
}
Transform {
id: textTransform
scale: 2
}
components: [textMesh, textTransform]
}
Entity {
ExtrudedTextWrapper {
id: anotherTextMesh
text: "[Press any key]"
depth: 1.0
horizontalAlignment: Text.AlignHCenter
ambientColor: "#FF00FF"
}
Transform {
id: anotherTextTransform
translation: Qt.vector3d(0, -4, 0)
}
components: [anotherTextMesh, anotherTextTransform]
}
onPressed: function (event) {
console.log("Intro | KeyboardHandler | onPressed")
Logic.nextScene(nextScene)
event.accepted = true;
}
onEscapePressed: function (event) {
console.log("Intro | KeyboardHandler | onPressed")
event.accepted = true;
}
}