2011-01-23 21:24:02 +00:00
|
|
|
<!doctype html>
|
|
|
|
<head>
|
|
|
|
<title>Draggable Button Prototype</title>
|
2011-01-24 00:02:15 +00:00
|
|
|
<script type = "text/javascript" src = "../controller.js"></script>
|
|
|
|
<script type = "text/javascript" src = "../gui.js"></script>
|
2011-01-23 21:24:02 +00:00
|
|
|
<script type = "text/javascript">
|
2011-01-24 00:02:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
var controllableObject = {
|
|
|
|
numberProperty: 20,
|
|
|
|
anotherNumberProperty: 0,
|
|
|
|
textProperty: "a string",
|
|
|
|
booleanProperty: false,
|
|
|
|
functionProperty: function() {
|
|
|
|
alert("I am a function!");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
window.onload = function() {
|
|
|
|
|
|
|
|
GUI.start();
|
|
|
|
|
|
|
|
// Creates a number box
|
|
|
|
GUI.add(controllableObject, "numberProperty");
|
|
|
|
}
|
2011-01-23 21:24:02 +00:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
</body>
|
|
|
|
</html>
|