| @@ -55,6 +55,7 @@ button { | |||||
| left: 0%; | left: 0%; | ||||
| text-align: center; | text-align: center; | ||||
| margin: auto; | margin: auto; | ||||
| padding-top: 1vh; | |||||
| } | } | ||||
| #top-bar > button { | #top-bar > button { | ||||
| @@ -257,6 +258,10 @@ button { | |||||
| left: 5%; | left: 5%; | ||||
| } | } | ||||
| body .news-banner { | |||||
| top: 8%; | |||||
| left: 22.5%; | |||||
| } | |||||
| body .news-text { | body .news-text { | ||||
| top: 12%; | top: 12%; | ||||
| left: 22.5%; | left: 22.5%; | ||||
| @@ -585,6 +590,7 @@ div::-webkit-scrollbar-corner { | |||||
| font-size: 24pt; | font-size: 24pt; | ||||
| color: #eee; | color: #eee; | ||||
| } | } | ||||
| .news-text { | .news-text { | ||||
| text-align: center; | text-align: center; | ||||
| position: fixed; | position: fixed; | ||||
| @@ -701,14 +707,18 @@ div::-webkit-scrollbar-corner { | |||||
| } | } | ||||
| #changelog-link a { | |||||
| #changelog-link { | |||||
| position: fixed; | position: fixed; | ||||
| left: 0%; | left: 0%; | ||||
| top: 0%; | top: 0%; | ||||
| height: 10vh; | height: 10vh; | ||||
| z-index: 2; | z-index: 2; | ||||
| font-size: 36px; | font-size: 36px; | ||||
| } | |||||
| #changelog-link div { | |||||
| font-size: 24px; | |||||
| color: gray; | |||||
| } | } | ||||
| #discord-link img { | #discord-link img { | ||||
| @@ -721,7 +731,7 @@ div::-webkit-scrollbar-corner { | |||||
| @media (max-aspect-ratio: 1/1) { | @media (max-aspect-ratio: 1/1) { | ||||
| body #changelog-link a { | |||||
| body #changelog-link { | |||||
| top: auto; | top: auto; | ||||
| bottom: 0%; | bottom: 0%; | ||||
| z-index: 2; | z-index: 2; | ||||
| @@ -24,13 +24,12 @@ | |||||
| <body class="dark"> | <body class="dark"> | ||||
| <div id="changelog-link"> | <div id="changelog-link"> | ||||
| <a href="https://crux.sexy/changelog#gorge">Changelog</a> | <a href="https://crux.sexy/changelog#gorge">Changelog</a> | ||||
| <div>Gorge v0.0.7a</div> | |||||
| </div> | </div> | ||||
| <div id="discord-link"> | <div id="discord-link"> | ||||
| <a href="https://discord.gg/vqcKVV6"><img src="images/discord.svg"></a> | <a href="https://discord.gg/vqcKVV6"><img src="images/discord.svg"></a> | ||||
| </div> | </div> | ||||
| <div id="top-bar"> | <div id="top-bar"> | ||||
| Gorge v0.0.7a | |||||
| <br> | |||||
| <button id="save">Save</button> | <button id="save">Save</button> | ||||
| <button id="reset">Reset saved data</button> | <button id="reset">Reset saved data</button> | ||||
| <button id="numbers">Number mode???</button> | <button id="numbers">Number mode???</button> | ||||
| @@ -48,6 +48,8 @@ let newsRemoveTimer; | |||||
| const newsDelay = 8000; | const newsDelay = 8000; | ||||
| let buttonClicked = false; | |||||
| const state = { | const state = { | ||||
| ownedUpgrades: ownedUpgrades, | ownedUpgrades: ownedUpgrades, | ||||
| resources: resources, | resources: resources, | ||||
| @@ -687,14 +689,28 @@ function initializeData() { | |||||
| }); | }); | ||||
| } | } | ||||
| function handleButton(e) { | |||||
| const add = eatPrey(); | |||||
| const text = "+" + render(round(add, 1), 3) + " food"; | |||||
| const gulp = "*glp*"; | |||||
| clickPopup(text, "food", [e.clientX, e.clientY]); | |||||
| clickPopup(gulp, "gulp", [e.clientX, e.clientY]); | |||||
| stats.clicks += 1; | |||||
| } | |||||
| function registerListeners() { | function registerListeners() { | ||||
| document.addEventListener("mouseup", (e) => { | |||||
| if (buttonClicked) { | |||||
| buttonClicked = false; | |||||
| handleButton(e); | |||||
| return false; | |||||
| } else { | |||||
| return true; | |||||
| } | |||||
| }); | |||||
| document.querySelector("#tasty-micro").addEventListener("mousedown", (e) => { | document.querySelector("#tasty-micro").addEventListener("mousedown", (e) => { | ||||
| const add = eatPrey(); | |||||
| const text = "+" + render(round(add, 1), 3) + " food"; | |||||
| const gulp = "*glp*"; | |||||
| clickPopup(text, "food", [e.clientX, e.clientY]); | |||||
| clickPopup(gulp, "gulp", [e.clientX, e.clientY]); | |||||
| stats.clicks += 1; | |||||
| buttonClicked = true; | |||||
| }); | }); | ||||
| document.querySelector("#save").addEventListener("click", save); | document.querySelector("#save").addEventListener("click", save); | ||||