diff --git a/client/css/editor.css b/client/css/editor.css index cc3bb88..51c7571 100644 --- a/client/css/editor.css +++ b/client/css/editor.css @@ -7,15 +7,43 @@ canvas { position: absolute; display: flex; flex-direction: column; - border: 1px solid; + border: 1px solid #fff; padding: 1rem; } #mapgen { display: flex; flex-direction: column; + position: absolute; } #export { margin-top: 1rem; } + +#popup { + background-color: #191919; + position: absolute; + flex-direction: column; + padding: .5rem; + border: 1px solid #fff; +} + +#popup textarea { + margin: .5rem 0; + height: 5rem; + background-color: transparent; + color: white; + border: 1px solid #fff; +} + +#popup input { + margin: 0; +} + +#close { + width: .3rem; + height: .3rem; + font-size: .6rem; + line-height: 0; +} diff --git a/client/img/atlas.png b/client/img/atlas.png index cb9e802..ebb467e 100644 Binary files a/client/img/atlas.png and b/client/img/atlas.png differ diff --git a/client/index.html b/client/index.html index 5e76fbc..251c33d 100644 --- a/client/index.html +++ b/client/index.html @@ -2,7 +2,6 @@
- diff --git a/client/mapeditor.html b/client/mapeditor.html index 5df8c38..6fbb158 100644 --- a/client/mapeditor.html +++ b/client/mapeditor.html @@ -15,10 +15,16 @@ +W: Place Wall
G: Place Ghost Wall
+H: Place Ghost Spawn
F: Place Food
1: Place Pac Spawn 1
2: Place Pac Spawn 2
diff --git a/client/src/editor.ts b/client/src/editor.ts index 77088ce..1abaad4 100644 --- a/client/src/editor.ts +++ b/client/src/editor.ts @@ -1,11 +1,11 @@ -import { genMap } from "./map.js" +import { genMap, compressMap, decompressMap } from "./map.js" import { startGraphicsUpdater } from "./renderer.js" import { GameState, Vec2, Tile } from "./types.js" const mapgen = document.getElementById("mapgen") const sidebar = document.getElementById("sidebar") -mapgen.onsubmit = async function(event) { +mapgen.onsubmit = async (event) => { event.preventDefault() const width_str = (