瀏覽代碼

Distinguish move buttons with no destination and with failed conditions

tags/v0.1.2
Fen Dweller 6 年之前
父節點
當前提交
ca0fdca6c2
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 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


Loading…
取消
儲存