From 0c2295dc1da2cc0a4f3423bede7db384d9c1edcb Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 10 Sep 2020 20:44:34 -0600 Subject: [PATCH] Make the editor grid a bit more rigid; add a few more basic tiles --- js/main.js | 20 ++++++++++++-------- style.css | 13 ++++++++----- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/js/main.js b/js/main.js index 23c414d..4f46811 100644 --- a/js/main.js +++ b/js/main.js @@ -679,7 +679,7 @@ const EDITOR_TOOLS = [{ icon: 'icons/tool-wire.png', name: "Wire", desc: "Draw CC2 wiring", - // TODO text tool; thin walls tool; map generator?; subtools for select tool (copy, paste, crop) + // TODO text tool; thin walls tool; ice tool; map generator?; subtools for select tool (copy, paste, crop) }]; // Tiles the "adjust" tool will turn into each other const EDITOR_ADJUST_TOGGLES = { @@ -708,16 +708,21 @@ const EDITOR_ADJUST_TOGGLES = { }; // TODO this MUST use a cc2 tileset! const EDITOR_PALETTE = [{ - title: "Our hero", - tiles: ['player'], + title: "Basics", + tiles: [ + 'player', + 'chip', 'chip_extra', + 'floor', 'wall', 'hint', 'socket', 'exit', + ], }, { title: "Terrain", tiles: [ - 'floor', 'wall', 'hint', 'socket', 'exit', 'popwall', 'fake_floor', 'fake_wall', + 'wall_invisible', 'wall_appearing', 'gravel', 'dirt', + 'door_blue', 'door_red', 'door_yellow', 'door_green', 'water', 'turtle', 'fire', 'ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se', 'force_floor_n', 'force_floor_s', 'force_floor_w', 'force_floor_e', 'force_floor_all', @@ -725,7 +730,6 @@ const EDITOR_PALETTE = [{ }, { title: "Items", tiles: [ - 'chip', 'chip_extra', 'key_blue', 'key_red', 'key_yellow', 'key_green', 'flippers', 'fire_boots', 'cleats', 'suction_boots', ], @@ -747,9 +751,9 @@ const EDITOR_PALETTE = [{ tiles: [ 'bomb', 'dirt_block', - 'button_red', - 'cloner', - 'trap', + 'button_blue', + 'button_red', 'cloner', + 'button_brown', 'trap', ], }]; class Editor extends PrimaryView { diff --git a/style.css b/style.css index e0fb544..41ba6f6 100644 --- a/style.css +++ b/style.css @@ -528,11 +528,11 @@ main.--has-demo .demo-controls { flex: 1 1 auto; display: grid; grid: - "controls level" - "palette level" - / minmax(20%, 1fr) auto + "controls level" min-content + "palette level" 1fr + / minmax(25%, auto) auto ; - gap: 1em; + gap: 0.5em; min-height: 0; margin: auto; @@ -571,6 +571,9 @@ main.--has-demo .demo-controls { } #editor .palette { grid-area: palette; + min-width: 20vw; + padding-right: 0.25em; /* in case of scrollbar */ + overflow-y: auto; } #editor .palette h2 { font-size: 1em; @@ -590,5 +593,5 @@ main.--has-demo .demo-controls { margin: 0.25em; } .palette-entry.--selected { - outline: 2px solid gold; + box-shadow: 0 0 0 1px black, 0 0 0 2px white; }