Преглед на файлове

Allow for names to be toggled; add some padding to option rows

tags/v0.1.0
Fen Dweller преди 5 години
родител
ревизия
3537b2b78e
променени са 3 файла, в които са добавени 27 реда и са изтрити 0 реда
  1. +10
    -0
      macrovision.css
  2. +9
    -0
      macrovision.html
  3. +8
    -0
      macrovision.js

+ 10
- 0
macrovision.css Целия файл

@@ -133,6 +133,8 @@ body.toggle-entity-name .entity-name {
display: flex; display: flex;
text-align: center; text-align: center;
width: 100%; width: 100%;
margin-top: 10px;
margin-bottom: 10px;
} }


.options-block { .options-block {
@@ -442,3 +444,11 @@ a {
a.corner-ribbon { a.corner-ribbon {
text-decoration: none; text-decoration: none;
} }

input[type=checkbox] {
transform: scale(2);
}

input ~ label {
user-select: none;
}

+ 9
- 0
macrovision.html Целия файл

@@ -104,6 +104,15 @@
<span class="switch-label">Auto-size world</span> <span class="switch-label">Auto-size world</span>
</label> </label>
</div> </div>
<div class="options-row">
<input type="checkbox" id="options-world-show-names">
<label for="options-world-show-names">Names over entities</label>
</div>
<div class="options-row">
<input type="checkbox" id="options-world-show-bottom-names">
<label for="options-world-show-bottom-names">Names at bottom</label>
</div>

<div class="options-label"> <div class="options-label">
Auto-sizing mode Auto-sizing mode
</div> </div>


+ 8
- 0
macrovision.js Целия файл

@@ -928,6 +928,14 @@ function doSliderEntityScale() {
document.addEventListener("DOMContentLoaded", () => { document.addEventListener("DOMContentLoaded", () => {
prepareEntities(); prepareEntities();


document.querySelector("#options-world-show-names").addEventListener("input", e => {
document.body.classList[e.target.checked ? "add" : "remove"]("toggle-entity-name");
});

document.querySelector("#options-world-show-bottom-names").addEventListener("input", e => {
document.body.classList[e.target.checked ? "add" : "remove"]("toggle-bottom-name");
});

document.querySelector("#options-order-forward").addEventListener("click", e => { document.querySelector("#options-order-forward").addEventListener("click", e => {
if (selected) { if (selected) {
entities[selected.dataset.key].priority += 1; entities[selected.dataset.key].priority += 1;


Loading…
Отказ
Запис