<stuff>
<![CDATA[
<div id="dialog_window_1" class="dialog_window" title="This is our first dialog window">
<p>Hello World!</p>
</div>
<script>
$(document).ready(function () {
$('#dialog_window_1').dialog();
});
</script>
]]>
</stuff>
<start type="script">
OutputTextNoBr(game.stuff)
</start>
<!--Saved by Quest 5.6.5508.33899-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="uitest">
<gameid>34419325-ce15-4906-ae0e-2fd8ce8f6373</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<stuff><![CDATA[
<div id="dialog_window_1" class="dialog_window" title="Help">
<p id="page0">Click the buttons at the bottom to see different stuff!</p>
<p id="page1" style="display:none;">You can type LOOK to look around or HELP to see this. You probably knew that already.</p>
<p id="page2" style="display:none;">Why not do this in your own game?</p>
<p id="page3" style="display:none;">Created by The Pixie, based on code by Jay Nabonne.</p>
</div>
<script>
function setPage(page) {
$('#page0').css('display', 'none');
$('#page1').css('display', 'none');
$('#page2').css('display', 'none');
$('#page3').css('display', 'none');
$('#page' + page).css('display', 'block');
}
$(document).ready(function () {
$('#dialog_window_1').dialog({
autoOpen: false,
height: 400,
width: 640,
buttons: {
"Intro": function() { setPage(0);},
"Commands": function() { setPage(1);},
"Hints": function() { setPage(2);},
"Credits": function() { setPage(3);},
"Done": function() { $(this).dialog("close");}
}
});
});
</script>
]]></stuff>
<start type="script">
OutputTextNoBr (game.stuff)
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<command>
<pattern>help</pattern>
<script>
JS.eval("$('#dialog_window_1').dialog('open')")
</script>
</command>
</asl>
<!--Saved by Quest 5.6.5508.33899-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="uitest">
<gameid>34419325-ce15-4906-ae0e-2fd8ce8f6373</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<stuff><![CDATA[
<div id="dialog_window_1" class="dialog_window" title="Who are you?">
<p>Click the buttons at the bottom to see different stuff!</p>
Name: <input type="text" id="name_input" /><br/>
Age: <input type="text" id="age_input" class="numbersOnly" /><br/>
Female? <input type="checkbox" id="gender_input" /><br/>
</div>
<script>
jQuery('.numbersOnly').keyup(function () {
this.value = this.value.replace(/[^0-9\.]/g,'');
});
function setValues() {
answer = $('#name_input').val() + "|" + $('#age_input').val() + "|" + $('#gender_input').is(":checked");
ASLEvent("HandleDialogue", answer);
$('#dialog_window_1').dialog("close");
}
$(document).ready(function () {
$('#dialog_window_1').dialog({
height: 400,
width: 640,
buttons: {
"Done": function() { setValues();}
}
});
});
</script>
]]></stuff>
<start type="script">
OutputTextNoBr (game.stuff)
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<function name="HandleDialogue" parameters="answer">
l = Split(answer, "|")
if (StringListItem(l, 2) = "true") {
msg ("You are a " + StringListItem(l, 1) + " years old woman called " + StringListItem(l, 0) + ".")
}
else {
msg ("You are a " + StringListItem(l, 1) + " years old man called " + StringListItem(l, 0) + ".")
}
</function>
</asl>