-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (99 loc) · 3.18 KB
/
index.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html>
<head>
<title>Game</title>
<link href="libs/js-sandbox-console/sandbox.css" rel="stylesheet"/><!-- js sandbox console style -->
<style type="text/css">
html, body {
margin:0px;
padding:0px;
background-color: black;
color:white;
}
#consoleButton {
position: absolute;
top:0px;
z-index:1000;
}
#title {
display:block;
background-color:black;
padding:20px;
position: absolute;
top:0px;
left:0px;
z-index:1000;
font-size:18px;
font-family:"Courier New";
width:200px;
height:100px;
text-align:center;
border:double;
border-color:white;
}
</style>
</head>
<body>
<!--<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>-->
<!-- BEGIN: js sandbox console stuff... -->
<!-- HTML -->
<div id="sandbox">sandbox console loading...</div>
<!-- Templates -->
<!-- The sandbox template: -->
<script type="text/template" id="tplSandbox">
<div class="input">
<textarea rows="1" placeholder="<%= placeholder %>"></textarea>
</div>
<pre class="output"></pre>
</script>
<!-- The command/result template (NB whitespace/line breaks matter inside <pre> tag): -->
<script type="text/template" id="tplCommand"><% if (! _hidden) { %><span class="command"><%= command %></span>
<span class="prefix"><%= this.resultPrefix %></span><span class="<%= _class %>"><%= result %></span>
<% } %></script>
<!-- Scripts -->
<!-- Underscore, Backbone, backbone-localStorage, jQuery -->
<script src="libs/jquery-1.7.2.js"></script>
<script src="libs/underscore.js"></script>
<script src="libs/backbone.js"></script>
<script src="libs/backbone.localStorage.js"></script>
<!-- The JS Sandbox Console script (requires underscore, backbone and jquery): -->
<script src="libs/js-sandbox-console/sandbox-console.js"></script>
<!-- When ready, create the model and view -->
<script type="text/javascript">
jQuery(document).ready(function($) {
// Create the sandbox:
window.sandbox = new Sandbox.View({
el : $('#sandbox'),
model : new Sandbox.Model({
iframe : true, // evaluate commands inside a hidden iframe (default: false)
fallback : true // use global eval if iframe isn't available (default: true)
}),
placeholder : "Use Javascript to interact or type :help"
});
// fix input to lower case
$('#sandbox textarea').keyup(function(){
var $this = $(this);
$this.val($this.val().toLowerCase());
});
});
</script>
<!-- END: js sandbox console stuff -->
<!-- title screen -->
<div id="title">
HackmanJS<br />
<br />
A learn to program RPG
</div>
<!-- BEGIN: melon js stuff -->
<div id="jsapp">
<!-- console button -->
<img id="consoleButton" src="data/sprite/utilities-terminal.png" />
<script type="text/javascript" src="libs/melonJS-0.9.3.js"></script><!-- include melonJS first -->
<script type="text/javascript" src="resources.js"></script>
<script type="text/javascript" src="gameObj.js"></script>
<script type="text/javascript" src="main.js"></script><!-- include main.js last -->
</div>
<!-- END: melon js stuff -->
<!--<a href="javascript:Firebug.chrome.open();" style="color:white;">Open Firebug Lite</a>-->
</body>
</html>