Add: Hide menu button

This commit is contained in:
Wizzard 2025-03-15 21:57:16 -04:00
parent 3a69f285f3
commit 3d0b960753
3 changed files with 68 additions and 17 deletions

@ -10,6 +10,7 @@
<body>
<div id="canvasContainer">
<button id="showMenuBtn" onclick="toggleMenu(true)" style="display: none;">Show Menu</button>
<div id="settingsHolder">
<div class="settings">
<div>
@ -29,7 +30,8 @@
<label for="gunsCheck">Weapons</label>
</div>
<div>
<input type="checkbox" onclick="toggleDisplayMoney()" id="moneyDisplay" name="money-display" checked />
<input type="checkbox" onclick="toggleDisplayMoney()" id="moneyDisplay" name="money-display"
checked />
<label for="moneyDisplay">Display Money</label>
</div>
<div>
@ -47,35 +49,21 @@
<option value="local">YOU</option>
</select>
</div>
<button id="showDangerousBtn" onclick="toggleDangerousOptions()">Show Dangerous Options</button>
<div class="dangerous-options" id="dangerousOptions">
<div>
<input type="checkbox" onclick="toggleMoneyReveal()" id="moneyReveal" name="money" />
<label for="moneyReveal">Money Reveal (Write Memory)</label>
</div>
</div>
<button id="hideMenuBtn" onclick="toggleMenu(false)">Hide Menu</button>
</div>
</div>
<canvas id="canvas"></canvas>
</div>
<script src="script.js"></script>
<script src="webstuff.js"></script>
<script>
function toggleDangerousOptions() {
const dangerousSection = document.getElementById('dangerousOptions');
const button = document.getElementById('showDangerousBtn');
if (dangerousSection.classList.contains('revealed')) {
dangerousSection.classList.remove('revealed');
button.textContent = 'Show Dangerous Options';
} else {
dangerousSection.classList.add('revealed');
button.textContent = 'Hide Dangerous Options';
}
}
</script>
</body>
</html>

@ -147,4 +147,42 @@ canvas {
.player-focus {
margin-top: 10px;
}
#hideMenuBtn {
background-color: #333;
color: white;
border: none;
padding: 5px 10px;
margin-top: 10px;
border-radius: 3px;
cursor: pointer;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
transition: background-color 0.3s;
width: 100%;
}
#hideMenuBtn:hover {
background-color: #444;
}
#showMenuBtn {
position: fixed;
top: 10px;
left: 10px;
background-color: rgba(25, 25, 25, 0.7);
color: white;
border: none;
padding: 5px 10px;
border-radius: 15px;
font-size: 14px;
cursor: pointer;
z-index: 101;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
transition: opacity 0.3s;
opacity: 0.6;
}
#showMenuBtn:hover {
opacity: 1;
}

25
webradar/webstuff.js Normal file

@ -0,0 +1,25 @@
function toggleDangerousOptions() {
const dangerousSection = document.getElementById('dangerousOptions');
const button = document.getElementById('showDangerousBtn');
if (dangerousSection.classList.contains('revealed')) {
dangerousSection.classList.remove('revealed');
button.textContent = 'Show Dangerous Options';
} else {
dangerousSection.classList.add('revealed');
button.textContent = 'Hide Dangerous Options';
}
}
function toggleMenu(show) {
const settingsHolder = document.getElementById('settingsHolder');
const showMenuBtn = document.getElementById('showMenuBtn');
if (show) {
settingsHolder.style.display = 'block';
showMenuBtn.style.display = 'none';
} else {
settingsHolder.style.display = 'none';
showMenuBtn.style.display = 'block';
}
}