Skip to content

Commit

Permalink
Beta 1 (Launch Update)
Browse files Browse the repository at this point in the history
After hours on end, MINECRAFT FINALLY OPENS!!!
Accounts still need some work and also multi-instancing isnt implemented but yea.
  • Loading branch information
MTSyntho committed Sep 15, 2024
1 parent de44bf8 commit 1629eb7
Show file tree
Hide file tree
Showing 9 changed files with 581 additions and 4 deletions.
1 change: 1 addition & 0 deletions assets/icons/grass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,22 @@ button:active {
height: 100%;
border: 0;
border-radius: 20px;
}

.instances {
position: fixed;
width: 70%;
height: 80%;
padding: 0px;
margin: auto;
inset: 0px;
display: flex;
flex-direction: column;
backdrop-filter: blur(20px) brightness(40%);
border-radius: 20px;
box-shadow: 0px 0px 20px #00000055;
z-index: 7; /* i like the number 7 */
opacity: 0;
scale: 0.8;
pointer-events: none;
}
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<div id=help class=help>
<iframe allow-scripts=true allow-same-origin=true allow-transparency=true class=windowiframe src='help.html' title='zdkrimson Help'></iframe>
</div>
<div id=instances class=instances>
<iframe allow-scripts=true allow-same-origin=true allow-transparency=true class=windowiframe src='instances.html' title='zdkrimson Settings'></iframe>
</div>
<div class=main>
<div class=homescrn>
<button onclick='help("show")' class=helpbtn>
Expand All @@ -28,7 +31,7 @@
</div>
<div class=homeactions>
<button>Play</button>
<button>Instances</button>
<button onclick='instances("show")'>Instances</button>
</div>
<p id=instancename class=currentinstance>Current Instance: Loading...</p>
</div>
Expand Down
23 changes: 23 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,20 @@ function help(status) {
}
}

function instances(status) {
var instmenu = document.getElementById("instances");

if (status == "show") {
instmenu.classList.add("popup");
instmenu.classList.remove("popout");
}

if (status == "hide") {
instmenu.classList.remove("popup");
instmenu.classList.add("popout");
}
}

// Listen for messages from iframe
window.addEventListener('message', function(event) {
console.log(event)
Expand Down Expand Up @@ -187,6 +201,11 @@ window.addEventListener('message', function(event) {
help('hide');
}

if (event.data == 'hideInstances') {
// Call instances function in the parent window
instances('hide');
}

// if (event.data == 'offlinelogin') {
// let offlineacc_data = [ localStorage.getItem('offlineusername') , localStorage.getItem('offlineuuid') ];
// pywebview.api.offline_account(offlineacc_data);
Expand All @@ -202,4 +221,8 @@ window.addEventListener('message', function(event) {
lastuser.textContent = "Logged in as: " + localStorage.getItem('current-username');
// i will figure out how to save last account, soon...
};

if (event.data == 'launchminecraft') {
pywebview.api.launch_minecraft(localStorage.getItem('current-username'), localStorage.getItem('current-uuid'), localStorage.getItem('launchversion'));
};
});
Loading

0 comments on commit 1629eb7

Please sign in to comment.