-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathff7-examples.html
93 lines (81 loc) · 1.98 KB
/
ff7-examples.html
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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="assets/css/ff7-ui.css">
<link rel="stylesheet" type="text/css" href="assets/css/ff7-ui-fonts.css">
<link rel="stylesheet" type="text/css" href="assets/css/demo.css">
</head>
<body>
<div class="ff7-text background">
...Who are you?...
</div>
<script src="assets/js/ff7.js"></script>
<script src="assets/js/ff7-text.js"></script>
<script src="assets/js/ff7-audio.js"></script>
<script src="assets/js/underscore.min.js"></script>
<script>
function showDialogues() {
var dialog1 = new FF7.Dialogue({
text: '“C\'mon newcomer.\nFollow me.”',
id: 'start-quote'
});
var dialog2 = new FF7.Dialogue({
character: 'Aeris',
text: '“This guy are sick.”',
id: 'aeris-quote'
});
var dialog3 = new FF7.Dialogue({
id: 'shinra-bld-dialogue',
text: '“Hey, Cloud.\n...What should we do?”',
options: [
{
text: "Let's bust on in!",
action: function(next) {
dialog1.hide();
setTimeout(function() {
dialog1.show();
dialog3.show();
}, 1000);
next();
}
},
{
text: "Let's sneak in quietly",
sound: 'menuStart',
action: function(next) {
dialog2.hide();
setTimeout(function() {
dialog2.show();
dialog3.show();
}, 1000);
next();
}
}]
});
var dialog4 = new FF7.Dialogue({
options: [
{text: "Test1"},
{text: "Test2"}
]
})
var dialog5 = new FF7.Dialogue({
options: [
{
text: "For those in a hurry",
dialog: dialog4
},
{text: "For those with a little time"}
]
});
dialog1.show();
dialog2.show();
dialog3.show();
dialog5.show();
}
// workaround to wait for font to load as dialogue
// box are incorrectly sized if it loads after font
window.setTimeout(showDialogues, 250);
</script>
</body>
</html>