Style the biome mode buttons

This commit is contained in:
Wuzzy 2023-10-27 20:19:17 +02:00
parent 8531bc6c3a
commit 289d4e9afe
3 changed files with 23 additions and 2 deletions

View File

@ -75,6 +75,20 @@ button:enabled:active {
border-color: #808080;
color: black;
}
button.activeBiomeModeButton{
background-color: #8888ff;
color: black;
}
button.activeBiomeModeButton:enabled:hover {
background-color: #bbbbff;
color: black;
}
button.activeBiomeModeButton:enabled:active {
background-color: white;
border-color: #808080;
color: black;
}
#biomeButtonContainer {
margin-top: 0.5em;
}
@ -161,6 +175,9 @@ h3 {
font-weight: bold;
color: #00ff00;
}
#modeContainer {
margin-bottom: 0.2em;
}
.collapser {
cursor: pointer;
}

View File

@ -25,7 +25,7 @@ the page in noscript mode. It will be unhidden once the JavaScript loads -->
<div id="mainContentContainer" class="contentContainer" hidden>
<div id="modeContainer">
<button id="modernModeButton" type="button">Modern biomes</button>
<button id="modernModeButton" type="button" class="activeBiomeModeButton">Biome points</button>
<button id="v6ModeButton" type="button">v6 biomes</button>
</div>
@ -90,7 +90,7 @@ A Voronoi diagram is supposed to be here but for some reason it cannot be displa
</div>
<div id="biomeV6ConfigContainerOuter" hidden>
<h2 class="configHeader"><span class="collapser" id="biomeV6ConfigHeaderLink"></span> v6 Biome configuration</h2>
<h2 class="configHeader"><span class="collapser" id="biomeV6ConfigHeaderLink"></span> Biome configuration</h2>
<div id="biomeV6ConfigContainer" class="configFrame">
<form id="biomeV6Form">
<div>Flags:

View File

@ -2319,6 +2319,8 @@ modernModeButton.onclick = function() {
noises.humidity = noises.humidity_modern;
noiseSettingNameHeat.innerText = "mg_biome_np_heat";
noiseSettingNameHumidity.innerText = "mg_biome_np_humidity";
modernModeButton.className = "activeBiomeModeButton";
v6ModeButton.className = "";
updateAreaVars();
updateWidgetStates();
draw(true);
@ -2334,6 +2336,8 @@ v6ModeButton.onclick = function() {
noises.humidity = noises.humidity_v6;
noiseSettingNameHeat.innerText = "mgv6_np_biome";
noiseSettingNameHumidity.innerText = "mgv6_np_humidity";
modernModeButton.className = "";
v6ModeButton.className = "activeBiomeModeButton";
updateAreaVars();
updateWidgetStates();
draw();