Skip to content

Commit

Permalink
1 file edited
Browse files Browse the repository at this point in the history
  • Loading branch information
Croc-Prog-github committed Feb 10, 2024
1 parent 400b49f commit d77e40b
Showing 1 changed file with 71 additions and 52 deletions.
123 changes: 71 additions & 52 deletions game/impo.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ <h2>Impostazioni Grafiche</h2>

<p></p>

<hx>Frame Generator</hx>
<hx>Schermo Intero</hx>
<div class="switch">
<input type="checkbox" id="switch-2">
<input type="checkbox" id="switch-2" onchange="window.parent.fs(this.checked)">
<label for="switch-2"></label>
</div>
<var style="margin-left: 25px;">Descrizione</var>
<var style="margin-left: 25px;">Rende a schermo intero il gioco</var>

<p></p>

Expand Down Expand Up @@ -186,6 +186,31 @@ <h2>Impostazioni Tastiera</h2>
</body>
</html>

<script> // Full Screen
function fs(checked) {
let element = document.documentElement || document.getElementById("body");

if (checked) {
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
}
} else {
// Esci dal full screen
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
}
}
</script>

<script>
function updateSetting(setting) {
value = document.getElementById(setting).value;
Expand Down Expand Up @@ -317,53 +342,47 @@ <h2>Impostazioni Tastiera</h2>

<style>
.switch {
position: relative;
display: inline-block;
width: 48px;
height: 24px;
margin: 0 10px;
border-radius: 8px;
overflow: hidden;
}

.switch input {
display: none;
}

.switch label {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ccc;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s ease-in-out;
}

.switch label:before {
content: "";
position: absolute;
top: 3px;
left: 3px;
width: 18px;
height: 18px;
background-color: #fff;
border-radius: 50%;
transition: margin 0.3s ease-in-out;
}

.switch input:checked + label {
background-color: #2196F3;
}

.switch input:checked + label:before {
margin-left: 24px;
}

.switch label:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.3);
}
position: relative;
display: inline-block;
width: 48px;
height: 24px;
margin: 0 10px;
border-radius: 8px;
overflow: hidden;
}
.switch input {
display: none;
}
.switch label {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ccc;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s ease-in-out;
}
.switch label:before {
content: "";
position: absolute;
top: 3px;
left: 3px;
width: 18px;
height: 18px;
background-color: #fff;
border-radius: 50%;
transition: margin 0.3s ease-in-out;
}
.switch input:checked + label {
background-color: #2196F3;
}
.switch input:checked + label:before {
margin-left: 24px;
}
.switch label:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.3);
}
</style>

0 comments on commit d77e40b

Please sign in to comment.