Images for mine and flag
This commit is contained in:
parent
f94319ab7b
commit
05b9885541
|
@ -224,6 +224,7 @@
|
||||||
|
|
||||||
li.flagged {
|
li.flagged {
|
||||||
background-color: #b5fe52;
|
background-color: #b5fe52;
|
||||||
|
background-image: url("images/flag.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
li.flagged:hover {
|
li.flagged:hover {
|
||||||
|
@ -232,7 +233,7 @@
|
||||||
|
|
||||||
li.mine.revealed {
|
li.mine.revealed {
|
||||||
background-color: #d23000;
|
background-color: #d23000;
|
||||||
color: #000;
|
background-image: url("images/skull.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
li.mines1 {
|
li.mines1 {
|
||||||
|
@ -688,10 +689,6 @@
|
||||||
|
|
||||||
if ($(this).isMine()) {
|
if ($(this).isMine()) {
|
||||||
$(this).addClass("revealed");
|
$(this).addClass("revealed");
|
||||||
$(this).html("☠"); //skull & crossbones
|
|
||||||
|
|
||||||
//game over, or lose a life, or whatever
|
|
||||||
//...
|
|
||||||
} else if (!automated && parseInt($(this).text()) === $(this).getAdjacentTiles().filter('.flagged, .revealed.mine').length) {
|
} else if (!automated && parseInt($(this).text()) === $(this).getAdjacentTiles().filter('.flagged, .revealed.mine').length) {
|
||||||
//already clicked; use middle click reveal functionality
|
//already clicked; use middle click reveal functionality
|
||||||
|
|
||||||
|
@ -755,6 +752,8 @@
|
||||||
|
|
||||||
if (mouseHeld) {
|
if (mouseHeld) {
|
||||||
mouseHeld = false;
|
mouseHeld = false;
|
||||||
|
|
||||||
|
//rightClick has already been called in a callback, so nothing to do here
|
||||||
} else {
|
} else {
|
||||||
switch (event.which) {
|
switch (event.which) {
|
||||||
case 3:
|
case 3:
|
||||||
|
|
Loading…
Reference in New Issue