Переглянути джерело

Distinguish move buttons with no destination and with failed conditions

tags/v0.1.2
Fen Dweller 6 роки тому
джерело
коміт
ca0fdca6c2
Не вдалося знайти GPG ключ що відповідає даному підпису Ідентифікатор GPG ключа: E80B35A6F11C3656
2 змінених файлів з 8 додано та 1 видалено
  1. +5
    -0
      satiate.css
  2. +3
    -1
      world.js

+ 5
- 0
satiate.css Переглянути файл

@@ -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 Переглянути файл

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


Завантаження…
Відмінити
Зберегти