diff --git a/web/css/main.css b/web/css/main.css index 5efbf875..b47047fb 100644 --- a/web/css/main.css +++ b/web/css/main.css @@ -91,7 +91,7 @@ body { color: #979797; font-size: 8px; top: 269px; - left: 68px; + left: 30px; position: absolute; user-select: none; diff --git a/web/index.html b/web/index.html index e082abde..a912d443 100644 --- a/web/index.html +++ b/web/index.html @@ -15,7 +15,7 @@ - + Cloud Retro @@ -48,7 +48,7 @@
- Arrows (move), ZXCVAS (game ABXYLR), 1/2 (1st/2nd player), Shift/Enter/K/L (select/start/save/load), F (fullscreen), share (copy shared link to the clipboard) + Arrows (move), ZXCVAS;'./ (game ABXYL1-L3R1-R3), 1/2 (1st/2nd player), Shift/Enter/K/L (select/start/save/load), F (fullscreen), share (copy the link to the clipboard)
@@ -123,7 +123,7 @@ - + @@ -137,7 +137,7 @@ - + diff --git a/web/js/input/keyboard.js b/web/js/input/keyboard.js index 91b9f548..3a09ba9e 100644 --- a/web/js/input/keyboard.js +++ b/web/js/input/keyboard.js @@ -16,6 +16,10 @@ const keyboard = (() => { KeyV: KEY.Y, KeyA: KEY.L, KeyS: KEY.R, + Semicolon: KEY.L2, + Quote: KEY.R2, + Period: KEY.L3, + Slash: KEY.R3, Enter: KEY.START, ShiftLeft: KEY.SELECT, // non-game diff --git a/web/js/settings/settings.js b/web/js/settings/settings.js index e3be8e81..81b38c0c 100644 --- a/web/js/settings/settings.js +++ b/web/js/settings/settings.js @@ -15,7 +15,7 @@ */ const settings = (() => { // internal structure version - const revision = 1.1; + const revision = 1.2; // default settings // keep them for revert to defaults option @@ -123,6 +123,7 @@ const settings = (() => { return { get, + clear: () => localStorage.removeItem(root), set, remove, save, @@ -164,12 +165,15 @@ const settings = (() => { } const init = () => { + // try to load settings from the localStorage with fallback to null-object provider = localStorageProvider(store) || voidProvider(store); provider.loadSettings(); - if (revision > store.settings._version) { - // !to handle this with migrations - log.warn(`Your settings are in older format (v${store.settings._version})`); + const lastRev = (store.settings || {_version: 0})._version + + if (revision > lastRev) { + log.warn(`Your settings are in older format (v${lastRev}) and will be reset to (v${revision})!`); + _reset(); } }