everything else

This commit is contained in:
MeowcaTheoRange 2023-11-24 23:09:23 -06:00
parent 6df77704f6
commit 6dbacb1d99
6 changed files with 30 additions and 7 deletions

View file

@ -16,5 +16,14 @@
"It's an API-less adaptation of Steam The Woz, running completely locally." "It's an API-less adaptation of Steam The Woz, running completely locally."
], ],
"url": "/projects/woz/" "url": "/projects/woz/"
},
{
"name": "JellyBean's Mid-Sim",
"date": 1651986000000,
"description": [
"JellyBean's Mid-Sim, a 1K rhythm game made in the HTML5-JS game engine Kaboom."
],
"url": "/projects/midsim/",
"size": [700, 400]
} }
] ]

View file

@ -12,10 +12,16 @@ fetch("./public/projects.json")
"" ""
)} )}
<p> <p>
<button onclick="window.open('${project.url}')">Open</button> or
<button <button
onclick=" onclick="window.open('${project.url}')"
new WindowObject(manager, '${project.url}')" >
Open
</button>
or
<button
onclick="window.manager.createWindow('${project.url}', false, ${
project.size?.[0] ?? "null"
}, ${project.size?.[1] ?? "null"})"
> >
Open Window Open Window
</button> </button>

View file

@ -60,7 +60,7 @@
id="stash" id="stash"
onchange="scott_index.disabled = event.target.checked" onchange="scott_index.disabled = event.target.checked"
/> />
<span class="checkbox">O</span> <span class="checkbox"></span>
Scott's Stash Scott's Stash
</label></small </label></small
><br /> ><br />

View file

@ -16,7 +16,7 @@ function createAccessibilityNodes() {
UI scale</label><br /> UI scale</label><br />
<label for="acc-base" class="checkbox"> <label for="acc-base" class="checkbox">
<input id="acc-base" type="checkbox" id="acc-base" /> <input id="acc-base" type="checkbox" id="acc-base" />
<span class="checkbox"></span> <span class="checkbox"></span>
Base style (requires reload) Base style (requires reload)
</label> </label>
</fieldset>`; </fieldset>`;

View file

@ -455,16 +455,20 @@ class WindowObject {
event__responseKeyDown(e) { event__responseKeyDown(e) {
switch (e.code) { switch (e.code) {
case "Backquote": case "Backquote":
e.preventDefault();
this.parentManager.raiseIndex(this, 1); this.parentManager.raiseIndex(this, 1);
break; break;
case "Backspace": case "Backspace":
e.preventDefault();
this.destroy(); this.destroy();
break; break;
case "Space": case "Space":
e.preventDefault();
if (e.shiftKey) this.minimizeWindow(); if (e.shiftKey) this.minimizeWindow();
else this.maximizeWindow(); else this.maximizeWindow();
break; break;
case "ArrowUp": case "ArrowUp":
e.preventDefault();
if (this.#isFrozen) return; if (this.#isFrozen) return;
if (e.shiftKey) if (e.shiftKey)
this.windowObject.style.height = this.windowObject.style.height =
@ -473,6 +477,7 @@ class WindowObject {
this.windowObject.style.top = this.windowObject.offsetTop - 10 + "px"; this.windowObject.style.top = this.windowObject.offsetTop - 10 + "px";
break; break;
case "ArrowDown": case "ArrowDown":
e.preventDefault();
if (this.#isFrozen) return; if (this.#isFrozen) return;
if (e.shiftKey) if (e.shiftKey)
this.windowObject.style.height = this.windowObject.style.height =
@ -481,6 +486,7 @@ class WindowObject {
this.windowObject.style.top = this.windowObject.offsetTop + 10 + "px"; this.windowObject.style.top = this.windowObject.offsetTop + 10 + "px";
break; break;
case "ArrowLeft": case "ArrowLeft":
e.preventDefault();
if (this.#isFrozen) return; if (this.#isFrozen) return;
if (e.shiftKey) if (e.shiftKey)
this.windowObject.style.width = this.windowObject.style.width =
@ -490,6 +496,7 @@ class WindowObject {
this.windowObject.offsetLeft - 10 + "px"; this.windowObject.offsetLeft - 10 + "px";
break; break;
case "ArrowRight": case "ArrowRight":
e.preventDefault();
if (this.#isFrozen) return; if (this.#isFrozen) return;
if (e.shiftKey) if (e.shiftKey)
this.windowObject.style.width = this.windowObject.style.width =
@ -499,6 +506,7 @@ class WindowObject {
this.windowObject.offsetLeft + 10 + "px"; this.windowObject.offsetLeft + 10 + "px";
break; break;
case "KeyR": case "KeyR":
e.preventDefault();
if (this.#isFrozen) return; if (this.#isFrozen) return;
this.windowObject.style.width = `600px`; this.windowObject.style.width = `600px`;
this.windowObject.style.height = `500px`; this.windowObject.style.height = `500px`;

View file

@ -90,12 +90,11 @@ div.window-object > div.window-manager {
grid-template-columns: auto max-content; grid-template-columns: auto max-content;
vertical-align: middle; vertical-align: middle;
height: 1.5em; height: 1.5em;
overflow: hidden; /* overflow: hidden; */
user-select: none; user-select: none;
} }
div.window-object > div.window-manager > div { div.window-object > div.window-manager > div {
overflow: hidden;
width: 100%; width: 100%;
vertical-align: middle; vertical-align: middle;
height: 100%; height: 100%;
@ -104,6 +103,7 @@ div.window-object > div.window-manager > div {
div.window-object > div.window-manager > div.window-manager-start { div.window-object > div.window-manager > div.window-manager-start {
text-align: start; text-align: start;
overflow: hidden;
} }
div.window-object div.window-object