Kaynağa Gözat

Distinguish move buttons with no destination and with failed conditions

tags/v0.1.2
Fen Dweller 6 yıl önce
ebeveyn
işleme
ca0fdca6c2
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: E80B35A6F11C3656
2 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  1. +5
    -0
      satiate.css
  2. +3
    -1
      world.js

+ 5
- 0
satiate.css Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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


Yükleniyor…
İptal
Kaydet