mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
toggle labels from save dialog
This commit is contained in:
parent
e9fa4cbd6c
commit
e923cf06c9
2 changed files with 10 additions and 4 deletions
|
|
@ -3400,6 +3400,10 @@
|
|||
<input id="pngResolutionInput" data-stored="pngResolution" type="range" min=1 max=8 value=1 style="width: 14em" oninput="pngResolutionOutput.value = this.value">
|
||||
<input id="pngResolutionOutput" data-stored="pngResolution" type="number" min=1 max=8 value=1 oninput="pngResolutionInput.value = this.value">
|
||||
</div>
|
||||
<div data-tip="Check to not allow system to automatically hide labels">
|
||||
<input id="showLabels" class="checkbox" type="checkbox" onchange="hideLabels.checked = !this.checked; invokeActiveZooming()" checked="">
|
||||
<label for="showLabels" class="checkbox-label">Show all labels</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loadMapData" style="display: none" class="dialog">
|
||||
|
|
|
|||
|
|
@ -635,6 +635,8 @@ function regeneratePrompt() {
|
|||
}
|
||||
|
||||
function showSavePane() {
|
||||
document.getElementById("showLabels").checked = !hideLabels.checked;
|
||||
|
||||
$("#saveMapData").dialog({
|
||||
title: "Save map",
|
||||
resizable: false,
|
||||
|
|
@ -755,17 +757,17 @@ document
|
|||
|
||||
function updateTilesOptions() {
|
||||
const tileSize = document.getElementById("tileSize");
|
||||
const tilesX = +document.getElementById("tileColsInput").value;
|
||||
const tilesY = +document.getElementById("tileRowsInput").value;
|
||||
const tilesX = +document.getElementById("tileColsOutput").value;
|
||||
const tilesY = +document.getElementById("tileRowsOutput").value;
|
||||
const scale = +document.getElementById("tileScaleOutput").value;
|
||||
|
||||
// calculate size
|
||||
const scale = +document.getElementById("tileScaleInput").value;
|
||||
const sizeX = graphWidth * scale * tilesX;
|
||||
const sizeY = graphHeight * scale * tilesY;
|
||||
const totalSize = sizeX * sizeY;
|
||||
|
||||
tileSize.innerHTML = `${sizeX} x ${sizeY} px`;
|
||||
tileSize.style.color = totalSize > 1e9 ? "#053305" : totalSize > 1e7 ? "#9e6409" : "#1a941a";
|
||||
tileSize.style.color = totalSize > 1e9 ? "#d00b0b" : totalSize > 1e8 ? "#9e6409" : "#1a941a";
|
||||
|
||||
// draw tiles
|
||||
const rects = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue