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
|
// After launch
|
||||||
// TODO: No local storage on IE - why?
|
// TODO: No local storage on IE - why?
|
||||||
// TODO: Do something about background-size failure on IE.
|
// TODO: Do something about background-size failure on IE.
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
thead.mid {
|
thead.mid {
|
||||||
border-top: solid 1px grey;
|
border-top: solid 1px grey;
|
||||||
@@ -122,3 +124,14 @@ tr { height: 15px; }
|
|||||||
body.iOS div.hint {
|
body.iOS div.hint {
|
||||||
visibility: visible;
|
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="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
|
||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="initial-scale=1.0;
|
content="initial-scale=1.0,
|
||||||
maximum-scale=1.0;
|
maximum-scale=1.0,
|
||||||
minimum-scale=1.0;
|
minimum-scale=1.0,
|
||||||
user-scalable=0;" />
|
user-scalable=0" />
|
||||||
<meta names="apple-mobile-web-app-status-bar-style" content="black" />
|
<meta names="apple-mobile-web-app-status-bar-style" content="black" />
|
||||||
<link rel="apple-touch-icon" href="touch-icon.png" />
|
<link rel="apple-touch-icon" href="touch-icon.png" />
|
||||||
</head>
|
</head>
|
||||||
@@ -186,6 +186,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<div id="paused"><br>PAUSED</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ function timeGetTime() {
|
|||||||
function StartTimer() {
|
function StartTimer() {
|
||||||
if (!timerid) {
|
if (!timerid) {
|
||||||
lasttick = timeGetTime();
|
lasttick = timeGetTime();
|
||||||
//timerid = setInterval(Timer1Timer, 100);
|
|
||||||
timerid = setTimeout(Timer1Timer, 100);
|
timerid = setTimeout(Timer1Timer, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1113,43 +1112,50 @@ function ToDna(s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function FormKeyDown(e) {
|
function FormKeyDown(e) {
|
||||||
if (e.which == 2) { // ^B
|
var key = String.fromCharCode(e.which);
|
||||||
Brag('brag');
|
|
||||||
//Navigate(GetHostAddr() + 'name=' + UrlEncode(Get(Traits,'Name')));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.which == 4) { // ^D
|
if (key === 'd') {
|
||||||
alert("Your character's genome is " + ToDna(game.dna + ""));
|
alert("Your character's genome is " + ToDna(game.dna + ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.which == 7) { // ^G
|
if (game.isonline) {
|
||||||
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);
|
if (key === 'b') {
|
||||||
Brag("guild");
|
Brag('brag');
|
||||||
|
//Navigate(GetHostAddr() + 'name=' + UrlEncode(Get(Traits,'Name')));
|
||||||
|
}
|
||||||
|
|
||||||
|
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 (key === 'm') {
|
||||||
|
game.motto = InputBox('Declare your motto!', game.motto);
|
||||||
|
Brag('motto');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.which == 13) { // ^M
|
if (key === 'p') {
|
||||||
game.motto = InputBox('Declare your motto!', game.motto);
|
if (timerid) {
|
||||||
Brag('motto');
|
$('#paused').css('display', 'block');
|
||||||
}
|
|
||||||
|
|
||||||
if (e.which == 16) { // ^P
|
|
||||||
if (timerid)
|
|
||||||
StopTimer();
|
StopTimer();
|
||||||
else
|
} else {
|
||||||
|
$('#paused').css('display', '');
|
||||||
StartTimer();
|
StartTimer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.which == 17) { // ^Q
|
if (key === 'q') {
|
||||||
quit();
|
quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.which == 19) { // ^S
|
if (key === 's') {
|
||||||
SaveGame();
|
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());
|
TaskBar.reposition(TaskBar.Max());
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user