-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.html
62 lines (57 loc) · 1.29 KB
/
demo.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
<!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>
<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() {
new FF7.Dialogue({
character: 'Rob',
text: 'Which thing to demo?',
options: [
{
text: 'Hiding things'
},
{
text: 'Misc actions',
action: function(next) {
alert('Hello!');
next();
}
},
{
text: 'Nested menus',
dialog: new FF7.Dialogue({
text: 'More options',
options: [
{ text: 'Option 1' },
{ text: 'Option 2' },
{
text: 'Further options',
dialog: new FF7.Dialogue({
options: [
{ text: 'Sub Option 1' },
{ text: 'Sub Option 2' }
]
})
}
]
})
}
]
}).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>