From 97c78292fef34a39552a4d983413b01e185a49aa Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sat, 17 Jun 2023 22:48:56 -0400 Subject: export and load maps --- client/css/editor.css | 30 ++- client/img/atlas.png | Bin 8168 -> 8495 bytes client/index.html | 1 - client/mapeditor.html | 6 + client/src/editor.ts | 56 +++-- client/src/lib/lz-string.ts | 505 ++++++++++++++++++++++++++++++++++++++++++++ client/src/logic/logic.ts | 50 ++--- client/src/main.ts | 5 +- client/src/map.ts | 76 ++++--- client/src/renderer.ts | 24 ++- client/src/types.ts | 26 +-- client/tsconfig.json | 2 +- 12 files changed, 672 insertions(+), 109 deletions(-) create mode 100644 client/src/lib/lz-string.ts (limited to 'client') 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 @@ +