Bladeren bron

Disabled exits are now clearly indicated

tags/v0.2.8
Fen Dweller 7 jaren geleden
bovenliggende
commit
23a266d212
2 gewijzigde bestanden met toevoegingen van 15 en 5 verwijderingen
  1. +10
    -0
      feast.css
  2. +5
    -5
      feast.js

+ 10
- 0
feast.css Bestand weergeven

@@ -35,6 +35,16 @@ button {
background: #111;
}

.disabled-button {
background: repeating-linear-gradient(
45deg,
#111,
#111 10px,
#622 10px,
#622 20px
);
}

.compass-button {
width: 100px;
height: 100px;


+ 5
- 5
feast.js Bestand weergeven

@@ -27,21 +27,21 @@ function round(number, digits) {
function updateExploreCompass() {
for (let i = 0; i < dirButtons.length; i++) {
let button = dirButtons[i];
button.classList.remove("active-button");
button.classList.remove("inactive-button");
button.classList.remove("disabled-button");
if (currentRoom.exits[i] == null) {
button.disabled = true;
button.classList.remove("active-compass-button");
button.classList.add("inactive-button");
button.innerHTML = "";
} else {
if (currentRoom.exits[i].conditions.reduce((result, test) => result && test(prefs), true)) {
button.disabled = false;
button.classList.remove("inactive-button");
button.classList.add("active-compass-button");
button.classList.add("active-button");
button.innerHTML = currentRoom.exits[i].name;
} else {
button.disabled = true;
button.classList.add("inactive-button");
button.classList.remove("active-compass-button");
button.classList.add("disabled-button");
button.innerHTML = currentRoom.exits[i].name;
}
}


Laden…
Annuleren
Opslaan