show brief welcome banner on nickbox screen

This commit is contained in:
Andy Janata 2012-09-09 22:08:24 -07:00
parent 554510ea3a
commit 86703070ec
3 changed files with 38 additions and 7 deletions

View File

@ -76,10 +76,38 @@ HttpSession hSession = request.getSession(true);
</div>
--%>
<div id="nickbox">
Nickname: <input type="text" id="nickname" value="" maxlength="30" />
<input type="button" id="nicknameconfirm" value="Set" />
<span id="nickbox_error" class="error"></span>
<div id="welcome">
<h1>
Pretend You're <dfn style="border-bottom: 1px dotted black"
title="Xyzzy is an Artificial Unintelligence bot. You'll be making more sense than him in this game.">
Xyzzy</dfn>
</h1>
<h3>A <a href="http://cardsagainsthumanity.com/">Cards Against Humanity</a> clone.</h3>
<p>
This webapp is still in development. There will be bugs, but hopefully they won't affect gameplay
very much. To assist with development, <strong>all traffic on this server <em>may</em> be
logged.</strong>
</p>
<p>
If this is your first time playing, you may wish to read <a href="/">the changelog and list of
known issues.</a>
</p>
<div id="nickbox">
Nickname: <input type="text" id="nickname" value="" maxlength="30" />
<input type="button" id="nicknameconfirm" value="Set" />
<span id="nickbox_error" class="error"></span>
</div>
<p>
Pretend You're Xyzzy is a Cards Against Humanity clone, which is available at
<a href="http://www.cardsagainsthumanity.com/">cardsagainsthumanity.com</a>, where you can buy it
or download and print it out yourself. It is distributed under a
<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons - Attribution -
Noncommercial - Share Alike license</a>. This web version is in no way endorsed or sponsored by
cardsagainsthumanity.com. You may download the source code to this version from
<a href="https://github.com/ajanata/PretendYoureXyzzy">GitHub</a>. For full license
information, including information about included libraries, see the
<a href="license.html">full license information</a>.
</p>
</div>
<div id="canvas" class="hide">

View File

@ -53,6 +53,9 @@ to, for instance, display the number of connected players.
</p>
<p>Recent Changes:</p>
<ul>
<li>Early September, 2012:<ul>
<li>The Second Expansion has been entered.</li>
</ul></li>
<li>29 August, 6:00 AM UTC:<ul>
<li>Chat flood protection. You may only chat 5 times in any given 15 second period.</li>
<li>Splitting game chat out will happen next, this was just an easy bandage.</li>
@ -120,7 +123,7 @@ to, for instance, display the number of connected players.
</ul>
<p>Known issues:</p>
<ul>
<li><strong>Do not open the game more than once in the same browser.</strong> Neither instances
<li><strong>Do not open the game more than once in the same browser.</strong> Neither instance
will receive all data from the server, and you will not be able to play. I have an idea on how to
fix this, but I haven't had time to do so.</li>
<li>This game was extensively tested in <a href="http://google.com/chrome">Google Chrome</a>.

View File

@ -30,7 +30,7 @@
cah.ajax.SuccessHandlers[cah.$.AjaxOperation.REGISTER] = function(data) {
cah.nickname = data[cah.$.AjaxResponse.NICKNAME];
cah.log.status("You are connected as " + cah.nickname);
$("#nickbox").hide();
$("#welcome").hide();
$("#canvass").show();
cah.ajax.after_registered();
@ -47,7 +47,7 @@ cah.ajax.SuccessHandlers[cah.$.AjaxOperation.FIRST_LOAD] = function(data) {
if (data[cah.$.AjaxResponse.IN_PROGRESS]) {
cah.nickname = data[cah.$.AjaxResponse.NICKNAME];
cah.log.status("You have reconnected as " + cah.nickname);
$("#nickbox").hide();
$("#welcome").hide();
$("#canvass").show();
cah.ajax.after_registered();