mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 00:34:00 -06:00
Change keyboard shortcuts to not need the control character. Sweet feedback when paused.
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
// Before launch
|
||||
// TODO: Hide cheaters
|
||||
|
||||
// After launch
|
||||
// TODO: No local storage on IE - why?
|
||||
// TODO: Do something about background-size failure on IE.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
thead.mid {
|
||||
border-top: solid 1px grey;
|
||||
@@ -122,3 +124,14 @@ tr { height: 15px; }
|
||||
body.iOS div.hint {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
div#paused {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 160px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
@@ -8,10 +8,10 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
|
||||
<meta name="viewport"
|
||||
content="initial-scale=1.0;
|
||||
maximum-scale=1.0;
|
||||
minimum-scale=1.0;
|
||||
user-scalable=0;" />
|
||||
content="initial-scale=1.0,
|
||||
maximum-scale=1.0,
|
||||
minimum-scale=1.0,
|
||||
user-scalable=0" />
|
||||
<meta names="apple-mobile-web-app-status-bar-style" content="black" />
|
||||
<link rel="apple-touch-icon" href="touch-icon.png" />
|
||||
</head>
|
||||
@@ -186,6 +186,9 @@
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div id="paused"><br>PAUSED</div>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ function timeGetTime() {
|
||||
function StartTimer() {
|
||||
if (!timerid) {
|
||||
lasttick = timeGetTime();
|
||||
//timerid = setInterval(Timer1Timer, 100);
|
||||
timerid = setTimeout(Timer1Timer, 100);
|
||||
}
|
||||
}
|
||||
@@ -1113,43 +1112,50 @@ function ToDna(s) {
|
||||
}
|
||||
|
||||
function FormKeyDown(e) {
|
||||
if (e.which == 2) { // ^B
|
||||
var key = String.fromCharCode(e.which);
|
||||
|
||||
if (key === 'd') {
|
||||
alert("Your character's genome is " + ToDna(game.dna + ""));
|
||||
}
|
||||
|
||||
if (game.isonline) {
|
||||
if (key === 'b') {
|
||||
Brag('brag');
|
||||
//Navigate(GetHostAddr() + 'name=' + UrlEncode(Get(Traits,'Name')));
|
||||
}
|
||||
|
||||
if (e.which == 4) { // ^D
|
||||
alert("Your character's genome is " + ToDna(game.dna + ""));
|
||||
}
|
||||
|
||||
if (e.which == 7) { // ^G
|
||||
if (key === 'g') {
|
||||
game.guild = InputBox('Choose a guild.\r\rMake sure you undestand the guild rules before you join one. To learn more about guilds, visit http://progressquest.com/guilds.php', game.guild);
|
||||
Brag("guild");
|
||||
}
|
||||
|
||||
if (e.which == 13) { // ^M
|
||||
if (key === 'm') {
|
||||
game.motto = InputBox('Declare your motto!', game.motto);
|
||||
Brag('motto');
|
||||
}
|
||||
|
||||
if (e.which == 16) { // ^P
|
||||
if (timerid)
|
||||
StopTimer();
|
||||
else
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
if (e.which == 17) { // ^Q
|
||||
if (key === 'p') {
|
||||
if (timerid) {
|
||||
$('#paused').css('display', 'block');
|
||||
StopTimer();
|
||||
} else {
|
||||
$('#paused').css('display', '');
|
||||
StartTimer();
|
||||
}
|
||||
}
|
||||
|
||||
if (key === 'q') {
|
||||
quit();
|
||||
}
|
||||
|
||||
if (e.which == 19) { // ^S
|
||||
if (key === 's') {
|
||||
SaveGame();
|
||||
alert(JSON.stringify(game).length);
|
||||
alert('Saved (' + JSON.stringify(game).length + ' bytes).');
|
||||
}
|
||||
|
||||
/*
|
||||
if (e.which == 20) { // ^T
|
||||
if (key === 't') {
|
||||
TaskBar.reposition(TaskBar.Max());
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user