offline version fix

This commit is contained in:
ParadoxGitHub 2023-03-13 21:20:47 -04:00
parent bab1b81a9d
commit 94a1b9022a
5 changed files with 3374 additions and 3359 deletions

View File

@ -72,6 +72,13 @@ Compile it yourself here: https://gitlab.com/lax1dude/eaglercraftx-1.8/
margin-left: -1.3vw;
}
#ratio {
position: relative;
top: 13vh;
font-size: 2vh;
font-family: sans-serif;
}
#meter {
width: 80vw;
margin:auto;
@ -93,8 +100,8 @@ Compile it yourself here: https://gitlab.com/lax1dude/eaglercraftx-1.8/
}
</style>
<script type="text/javascript">
function updateTextProgress(progress, total){
document.getElementById("progresstext").innerText = Math.round(progress/total*100) + "%" + "(" + progress + "MB" + "/" + total + "MB )";
function updateTextProgress(event, epkSize){
document.getElementById("progresstext").innerText = Math.round(event.loaded/epkSize*10000)/100 + "%" + "(" + Math.round(event.loaded/1024/1024) + "MB" + "/" + Math.round(epkSize/1024/1024) + "MB )";
}
function setVersion(version){
@ -105,7 +112,7 @@ Compile it yourself here: https://gitlab.com/lax1dude/eaglercraftx-1.8/
let progress = Math.round(event.loaded/1024/1024);
let size = Math.round(epkSize/1024/1024);
document.getElementById("progress").style.width = (Math.round(progress/size*100)+4)+"%";
updateTextProgress(progress, size);
updateTextProgress(event, epkSize);
}
function die(){
@ -140,6 +147,13 @@ window.addEventListener("load", () => {
<div id = "dividk">
<h1 id="clienttitle">Resent Client</h1>
<h2 id="clientversion">3.6</h2>
<p id="progresstext">0%</p>
<p id="ratio">use <a href="./badwifi/index.html">this link</a> if your internet is bad</p>
<div id="meter">
<span style="width: 0%" id="progress"></span>
</div>
</div>
</body>
</html>

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -78,6 +78,7 @@ public class PlatformRuntime {
static WebGLFramebuffer mainFramebuffer = null;
public static void create() {
setClientVersion(ClientInfo.version);
win = Window.current();
doc = win.getDocument();
@ -304,7 +305,7 @@ public class PlatformRuntime {
int epkSize = Integer.parseInt(request.getResponseHeader("content-length"));
Event event = evt;
setClientVersion(ClientInfo.version);
setBarProgress(event, epkSize);
}catch (Exception e){
e.printStackTrace();