From 6c41248bd6beaeb6dc5377c94d485babce9f4f2b Mon Sep 17 00:00:00 2001 From: Max Robinson Date: Sun, 28 Nov 2021 22:29:36 -0600 Subject: [PATCH] cleaned hotkeys and button coloring --- dist/css/style.css | 8 ++++---- dist/index.html | 36 ++++++++++++++++----------------- src/Controllers/ControlPanel.js | 5 +++-- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/dist/css/style.css b/dist/css/style.css index f98f464..1714871 100644 --- a/dist/css/style.css +++ b/dist/css/style.css @@ -79,6 +79,9 @@ button { button:hover{ background-color: #81d2c7; } +button:active{ + background-color: #595e77; +} .icon-links { font-size: 35px; @@ -163,10 +166,7 @@ button:hover{ height: 30px; margin-top: 5px; } -.edit-mode-btn:hover{ - background-color: #81d2c7; -} -.edit-mode-btn#drag-view { +.edit-mode-btn.selected { background-color: #81d2c7; } #clear-walls { diff --git a/dist/index.html b/dist/index.html index 8b02b9d..0166f53 100644 --- a/dist/index.html +++ b/dist/index.html @@ -19,17 +19,17 @@
- - - - - - + + + + + +

Simulation Speed

- - + +

Target FPS: 60

@@ -98,9 +98,9 @@
- - - + + +
@@ -265,13 +265,13 @@
- - - - - - - + + + + + + +
diff --git a/src/Controllers/ControlPanel.js b/src/Controllers/ControlPanel.js index 17d3d84..5ec9e54 100644 --- a/src/Controllers/ControlPanel.js +++ b/src/Controllers/ControlPanel.js @@ -68,6 +68,7 @@ class ControlPanel { break; case 'j': case ' ': + e.preventDefault(); $('.pause-button')[0].click(); break; // miscellaneous hotkeys @@ -302,8 +303,8 @@ class ControlPanel { case "drag-view": self.setMode(Modes.Drag); } - $('.edit-mode-btn').css('background-color', '#9099c2'); - $('.'+this.id).css('background-color', '#81d2c7'); + $('.edit-mode-btn').removeClass('selected'); + $('.'+this.id).addClass('selected'); }); $('.reset-view').click( function(){