Add: Hide menu button
This commit is contained in:
parent
3a69f285f3
commit
3d0b960753
webradar
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="canvasContainer">
|
<div id="canvasContainer">
|
||||||
|
<button id="showMenuBtn" onclick="toggleMenu(true)" style="display: none;">Show Menu</button>
|
||||||
<div id="settingsHolder">
|
<div id="settingsHolder">
|
||||||
<div class="settings">
|
<div class="settings">
|
||||||
<div>
|
<div>
|
||||||
@ -29,7 +30,8 @@
|
|||||||
<label for="gunsCheck">Weapons</label>
|
<label for="gunsCheck">Weapons</label>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
<label for="moneyDisplay">Display Money</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -47,35 +49,21 @@
|
|||||||
<option value="local">YOU</option>
|
<option value="local">YOU</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button id="showDangerousBtn" onclick="toggleDangerousOptions()">Show Dangerous Options</button>
|
<button id="showDangerousBtn" onclick="toggleDangerousOptions()">Show Dangerous Options</button>
|
||||||
|
|
||||||
<div class="dangerous-options" id="dangerousOptions">
|
<div class="dangerous-options" id="dangerousOptions">
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" onclick="toggleMoneyReveal()" id="moneyReveal" name="money" />
|
<input type="checkbox" onclick="toggleMoneyReveal()" id="moneyReveal" name="money" />
|
||||||
<label for="moneyReveal">Money Reveal (Write Memory)</label>
|
<label for="moneyReveal">Money Reveal (Write Memory)</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button id="hideMenuBtn" onclick="toggleMenu(false)">Hide Menu</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<canvas id="canvas"></canvas>
|
<canvas id="canvas"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<script src="script.js"></script>
|
<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>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -147,4 +147,42 @@ canvas {
|
|||||||
|
|
||||||
.player-focus {
|
.player-focus {
|
||||||
margin-top: 10px;
|
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
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';
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user