From 22d1bd7620260db17eb5fdefddf24d80007242a4 Mon Sep 17 00:00:00 2001 From: Sergey Stepanov Date: Sun, 7 Apr 2024 00:14:04 +0300 Subject: [PATCH] Add screen component --- web/css/main.css | 42 +++----------- web/css/ui.css | 21 +++++++ web/index.html | 8 +-- web/js/app.js | 56 +++++++----------- web/js/env.js | 12 ++-- web/js/gui.js | 8 +-- web/js/menu.js | 17 ++++++ web/js/screen.js | 48 +++++++++++++++ web/js/settings.js | 11 +++- web/js/stats.js | 7 +-- web/js/stream.js | 141 +++++++++++++++++---------------------------- 11 files changed, 192 insertions(+), 179 deletions(-) create mode 100644 web/js/menu.js create mode 100644 web/js/screen.js diff --git a/web/css/main.css b/web/css/main.css index 270b7ce8..f9fdf5f4 100644 --- a/web/css/main.css +++ b/web/css/main.css @@ -3,12 +3,11 @@ src: url('/fonts/6809-Chargen.woff2'); } - +/*noinspection CssInvalidPseudoSelector*/ .no-media-controls::-webkit-media-controls { display: none !important; } - html { /* force full size for Firefox */ width: 100%; @@ -170,25 +169,6 @@ body { transform: translateY(-50%); } - -#bottom-screen { - display: flex; - align-items: center; - justify-content: center; - - width: 320px; - height: 240px; - position: absolute; - top: 23px; - left: 150px; - overflow: hidden; - background-color: #333; - - border-radius: 5px 5px 5px 5px; - - box-shadow: 0 0 2px 2px rgba(25, 25, 25, 1); -} - #color-button-holder { display: block; width: 120px; @@ -419,14 +399,8 @@ body { opacity: 0.75; } -#bottom-screen { - position: absolute; - /* popups under the screen fix */ - z-index: -1; -} - .game-screen { - position: absolute; + position: relative; object-fit: contain; width: inherit; height: inherit; @@ -665,6 +639,7 @@ body { position: absolute; z-index: 200; backface-visibility: hidden; + cursor: default; display: flex; flex-direction: column; @@ -674,13 +649,13 @@ body { right: 1.1em; color: #fff; background: #000; - opacity: .765; - padding: .5em 1em .1em 1em; + opacity: .465; + font-size: 2vh; font-family: monospace; - font-size: 40%; + min-width: 3.5em; - width: 70px; + padding-right: .2em; visibility: hidden; } @@ -689,8 +664,7 @@ body { display: flex; flex-flow: wrap; justify-content: space-between; - - margin-bottom: .7em; + align-items: center; } #stats-overlay > div > div { diff --git a/web/css/ui.css b/web/css/ui.css index ce3cfd27..28041893 100644 --- a/web/css/ui.css +++ b/web/css/ui.css @@ -227,3 +227,24 @@ .app-button:hover { color: #7e7e7e; } + + +#screen { + display: flex; + align-items: center; + justify-content: center; + + position: absolute; + /* popups under the screen fix */ + z-index: -1; + + width: 320px; + height: 240px; + top: 23px; + left: 150px; + overflow: hidden; + background-color: #333; + + border-radius: 5px 5px 5px 5px; + box-shadow: 0 0 2px 2px rgba(25, 25, 25, 1); +} diff --git a/web/index.html b/web/index.html index 8093f5d4..580bcdb5 100644 --- a/web/index.html +++ b/web/index.html @@ -8,7 +8,6 @@ - @@ -31,14 +30,9 @@
-
+
- -