Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions charsel.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
@font-face { font-family: PixelifySans; src: url('./Addons/PixelifySans.ttf');}
</style>
</head>
<body style="background-color: black; width: 100%; height: 100%; position: absolute; overflow:hidden; top: 0; left: 0;">
<div id="main" style="height: 576px; width: 1024px; background-color: black; display: block; position: absolute; border-style: solid; top: 0; left: 0; border-radius: 5px;">
<body style="background-color: black; width: 100%; height: 100%; position: relative; overflow:hidden; top: 0; left: 0; margin: 0;">
<div id="main" style="height: 576px; width: 1024px; background-color: black; display: block; position: relative; top: 0; left: 0; margin: 0;">
<h1 style="display: block; position: absolute; width: 100%; align-self:start; font-size: 60px; color: white;">CHOOSE YOUR OVERFATE</h1>

<div class="selector" id="sel" style="position: absolute; width: 100%; top:75%; align-items: center; justify-content: center;display: flex; display: flex;">
Expand Down Expand Up @@ -49,7 +49,7 @@ <h4 id="label2">
</a>
</div>

<canvas height="576" width="1024" style="">
<canvas height="576" width="1024" style="margin: 0; left: 0;">

</canvas>

Expand Down Expand Up @@ -123,6 +123,10 @@ <h1 style="color: white; font-size: 50px;">


<style>
.zoom {
transform: scale(1.51);
transform-origin: 0 0;
}
.spinner{
height: 40px;
width: 40px;
Expand Down
6 changes: 3 additions & 3 deletions electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ const {app, BrowserWindow} = electron
const url = require('url')
const path = require('path')

//require('electron-reload')(__dirname,{electron: path.join(__dirname, 'node_modules', '.bin', 'electron')})
require('electron-reload')(__dirname,{electron: path.join(__dirname, 'node_modules', '.bin', 'electron')})

let windowObj = null

function createWindow(){
windowObj = new BrowserWindow({
width: 1050,
height: 617,
width: 1015,
height: 590,
alwaysOnTop: false,
maximizable: false,
minimizable: false,
Expand Down
25 changes: 16 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
background-color: black;
}
</style>
<body style="overflow: hidden;">
<body style="overflow: hidden; position: relative; margin: 0;">

<div class="main" style="position: relative; width: 1015px; height: 576px;">
<div id="main" class="main" style="position: relative; width: 1024px; height: 580px; margin: 0;">

<div style="display: none; position: absolute; top: 27%; left: 20%; border-radius: 7px; border-width: 3px; border-color: silver; align-items: center; justify-content: center; border-style: solid; background-color: rgb(40, 40, 40); height: 50%; width: 60%;" id="GameOverScreen">

Expand Down Expand Up @@ -83,7 +83,7 @@ <h1 style="text-align: center; font-family: PixelifySans, sans-serif; font-size:
</div>

</div>
<canvas class="canv1" width="1015" height="576"></canvas>
<canvas class="canv1" width="1024" height="576"></canvas>

<!-- <div class="fps-alert" id="fps-al" style="display: none; position: absolute; top: -60px; left: 30px; width: 400px; background-color: rgb(61, 61, 61);">
<h5 style="color: red; font-family: PixelifySans,system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;">
Expand Down Expand Up @@ -116,7 +116,7 @@ <h1 style="text-align: center; display: block; font-family: PixelifySans, sans-s

</div>
</div>
<div id="transition" class="tr" style="display: none; position: absolute; top: 0; width: 100%; height: 100%; background-color: transparent; transition: all 1s ease-out;"></div>
<div id="transition" class="tr" style="display: none; position: absolute; top: 0; width: 100%; height: 100%; background-color: transparent; transition: all 1s ease-in-out;"></div>
<div id="load-scr" class="lodscr">
<div id="spin-lod" class="spinner">

Expand Down Expand Up @@ -430,6 +430,10 @@ <h5 style="text-align: center; font-family: PixelifySans, sans-serif; color: rgb
margin-bottom: 30px;
cursor: pointer;
}
.zoom {
transform: scale(1.5);
transform-origin: 0 0;
}
.alttime{
position: absolute;
top: 30%;
Expand Down Expand Up @@ -479,7 +483,6 @@ <h5 style="text-align: center; font-family: PixelifySans, sans-serif; color: rgb
<script src="JS/main.js"></script>
<script>
var metadt

var urlParams = new URLSearchParams(window.location.search);

var metadata = urlParams.get('choice');
Expand All @@ -489,11 +492,14 @@ <h5 style="text-align: center; font-family: PixelifySans, sans-serif; color: rgb

console.log(metadata)

var options = urlParams.get('options');

options = JSON.parse(options)
var options = JSON.parse(localStorage.getItem("options"))
console.log(options)
if(!options) document.getElementById('err').style.display = 'block'

if(options.Fullscreen === 'yes'){
document.getElementById('main').classList.add('zoom')
}

console.log(options)
if(options.showFPS === 'no'){
document.getElementById('fpscounter').style.display = 'none'
Expand All @@ -505,6 +511,7 @@ <h5 style="text-align: center; font-family: PixelifySans, sans-serif; color: rgb
else document.getElementById('timer').innerHTML = options.Timer
}
if(options.Rounds){
var wins = JSON.parse(localStorage.getItem("wins"))
var div = document.createElement("div")
div.classList.add("rnds")
var rounds1 = document.createElement("div")
Expand All @@ -518,9 +525,9 @@ <h5 style="text-align: center; font-family: PixelifySans, sans-serif; color: rgb
rounds1.innerHTML += div.outerHTML
rounds2.innerHTML += div.outerHTML
}

document.getElementById("side-r").appendChild(rounds2, documentFragment)
document.getElementById("side-l").appendChild(rounds1, documentFragment)
console.log(document.getElementById("side-r"), document.getElementById("side-l"))
}
Player1.Char = metadata.data.P1
Player2.Char = metadata.data.P2
Expand Down
83 changes: 77 additions & 6 deletions mainmen.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</head>
<body style="width: 1015px; height: 565px;">
<audio src="./Addons/hover.mp3" id="hoveraudio"></audio>
<div style="height: 100%; display: flex; position: relative; width: 100%; background-color: gray; border-width: 5px; border-radius: 5px; border-color: white; border-style: solid;" id="main">
<div style="height: 100%; display: flex; position: relative; width: 100%; margin: 0; background-color: gray; top: 0; left: 0;" id="main">
<img src="./Addons/Background/gradient.png" alt="" style="width: 100%;">
<div class="title">
<h1 style="display: block;">OVERFATE</h1>
Expand Down Expand Up @@ -43,8 +43,10 @@ <h1 style="display: block; top: 0; text-align: center;">OPTIONS</h1>
<a onclick="parameters(2)">Timer: <span style="color: #8c8308;" id="time-choice">100</span> <span style="color: #8c0808;" id="time-choice"> sec</span></a>
<a onclick="parameters(3)">Fullscreen mode: <span style="color: #8c8308;" id="fs-toggle">no</span></a>
<a onclick="parameters(4)">Number of rounds: <span style="color: #8c8308;" id="round-choice">1</span></a>
<a onclick="parameters(5)" style="color:#8c0808;">Clear LocalStorage</a>

</div>

</div>
<div class="sp-thanks" id="sp-thanks" style="display: none; position: absolute; width: 100%; height: 100%; background-color: rgb(46, 34, 34); top: 0;">

Expand All @@ -69,15 +71,28 @@ <h4 id="sp-txt">
</div>
</div>
</div>
<div id="transition" class="tr" style="display: none; position: absolute; top: 0; width: 100%; height: 100%; background-color: transparent;"></div>
<div class="notification" id="notification" style="display: none; width: 250px; height: 60px; position: absolute; bottom: 0; right: 0; border-radius: 5px; border-width: 3px; border-style: solid; border-color: rgb(97, 19, 19); background-color: rgb(46, 34, 34); transition: all 1s ease-out; animation: notification 1.5s ease-out;">
<h3 style="color: #8c8308; vertical-align: middle; text-align: center; font-family: PixelifySans, sans-serif;">
Sucess
</h3>
</div>

<div id="transition" class="tr" style="display: none; position: absolute; top: 0; width: 100%; height: 100%; background-color: transparent;"></div>
</div>



</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
var metadata = new URLSearchParams(window.location.search);
try{
var optmeta = JSON.parse(metadata.get('options'))
if(optmeta.Fullscreen === 'yes'){
document.getElementById('main').classList.add('zoom')
}}catch(e){

}
$("#selection a") // loop each menu item
.each(function(i) {
if (i != 0) { // only clone if more than one needed
Expand All @@ -95,6 +110,17 @@ <h4 id="sp-txt">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.1.1/howler.min.js"></script>
<script>
options = JSON.parse(localStorage.getItem("options"))
if(JSON.parse(localStorage.getItem("options")).Fullscreen === 'yes'){
document.getElementById('main').classList.add('zoom');
document.getElementById('fs-toggle').innerText = 'yes'
}

document.getElementById('fps-box').innerHTML = options.showFPS
document.getElementById('time-choice').innerText = options.Timer
document.getElementById('fs-toggle').innerText = options.Fullscreen
document.getElementById("round-choice").innerText = options.Rounds

document.querySelector('h4').style.color = '#8c8308'
setInterval(() => {
if(document.getElementById('sp-thanks').style.display !== 'none'){
Expand Down Expand Up @@ -169,18 +195,38 @@ <h4 id="sp-txt">
switch(Fullscreen){
case 'yes': {
document.getElementById('fs-toggle').innerText = 'no'
if (document.fullscreenElement) {
/*if (document.fullscreenElement) {
// exitFullscreen is only available on the Document object.
document.exitFullscreen();
}*/
document.getElementById('main').classList.add('unzoom')
try{
document.getElementById('main').classList.remove('zoom')
}catch(e){

}
}break;
case 'no': {
document.getElementById('fs-toggle').innerText = 'yes'
if (!document.fullscreenElement) {
/*if (!document.fullscreenElement) {
el.requestFullscreen();
} else {

}*/
try{
document.getElementById('main').classList.remove('unzoom')
}catch(e){

}
document.getElementById('main').classList.add('zoom')
el.dispatchEvent(new Event('keypress', {keyCode: 'F11'}))
$(() => {
var e = $.Event('keypress');
e.which = 27; // Character 'A'
$('item').trigger(e);
});


}break;
}
}
Expand All @@ -198,6 +244,28 @@ <h4 id="sp-txt">
}break;
}
}
else if(num === 5){
localStorage.clear()
document.getElementById('fps-box').innerHTML = options.showFPS = 'no'
document.getElementById('time-choice').innerText = options.Timer = 100
document.getElementById("round-choice").innerText = options.Rounds = 1
localStorage.setItem("wins", JSON.stringify({PL1: 0, PL2: 0}))
/*localStorage.setItem("options", JSON.stringify({
FS: null,
Rounds: null,
showFPS: null,
Timer: 100
}))*/
document.getElementById('notification').style.display = 'block'

setTimeout(() => {
document.getElementById('notification').style.opacity = '0%'
setTimeout(() => {
document.getElementById('notification').style.display = 'none'
document.getElementById('notification').style.opacity = '100%'
},1000)
}, 2500)
}
}

function redirect(num){
Expand All @@ -215,8 +283,9 @@ <h4 id="sp-txt">
Rounds: document.getElementById("round-choice").innerText
}
Options = JSON.stringify(Options)
localStorage.setItem("options", Options)
setTimeout(() => {
window.location.href = './charsel.html?options=' + Options
window.location.href = './charsel.html'
},1000)
}
else if(num === 3){
Expand Down Expand Up @@ -246,6 +315,8 @@ <h4 id="sp-txt">
}
}
}

window.addEventListener('keypress', (event) => {
console.log(event)
})
</script>
</html>