Procházet zdrojové kódy

Distinguish move buttons with no destination and with failed conditions

tags/v0.1.2
Fen Dweller před 6 roky
rodič
revize
ca0fdca6c2
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: E80B35A6F11C3656
2 změnil soubory, kde provedl 8 přidání a 1 odebrání
  1. +5
    -0
      satiate.css
  2. +3
    -1
      world.js

+ 5
- 0
satiate.css Zobrazit soubor

@@ -350,6 +350,11 @@ a:hover {
border: none;
}

.missing {
background-color: #444;
color: #aaa !important;
}

#move-up-left {
position: absolute;
left: -140px;


+ 3
- 1
world.js Zobrazit soubor

@@ -40,7 +40,7 @@ function resetControls(state) {
const button = document.createElement("button");
button.classList.add("move-button")
button.id = "move-" + dir;
button.classList.add("disabled");
button.classList.add("missing");
button.setAttribute("disabled", "true");
button.textContent = dirs[dir];
moveHolder.appendChild(button);
@@ -177,6 +177,8 @@ function updateRoom(state) {
}
}

button.classList.remove("missing");
button.classList.add("disabled");
button.textContent = dest.name;

// if any condition fails, don't enable/add a listener


Načítá se…
Zrušit
Uložit