From c7cbd3430a6431ce6ed56fafc3bbb03a2a34df33 Mon Sep 17 00:00:00 2001 From: Max Poletaev Date: Mon, 6 Jan 2025 19:24:19 +0300 Subject: [PATCH] UI mprovements --- cmd/dendy-wasm/main.go | 1 - web/index.html | 80 ++++++++++++++++++++++-------------------- web/style.css | 31 ++++++++-------- 3 files changed, 56 insertions(+), 56 deletions(-) diff --git a/cmd/dendy-wasm/main.go b/cmd/dendy-wasm/main.go index b63058b..9d48e8d 100644 --- a/cmd/dendy-wasm/main.go +++ b/cmd/dendy-wasm/main.go @@ -43,7 +43,6 @@ func main() { for { nes.Tick() - if nes.FrameReady() { frame := nes.Frame() frameBytes := unsafe.Slice((*byte)(unsafe.Pointer(&frame[0])), len(frame)*4) diff --git a/web/index.html b/web/index.html index 3099bc0..fc97149 100644 --- a/web/index.html +++ b/web/index.html @@ -10,49 +10,51 @@ -
-
-

NES Emulator

-
- -
-
- -
-
- -
-
- Select ROM: +
+
+
+ +
-
-
- WASD - D-Pad -
-
- J - A Button +
+
+ Select ROM:
-
- K - B Button -
-
- Enter - Start -
-
- Right Shift - Select -
-
- ⌘+R - Reset + +
+
+ WASD + D-Pad +
+
+ J + B Button +
+
+ K + A Button +
+
+ Enter + Start +
+
+ Right Shift + Select +
+
+ ⌘+R + Reset +
+ +
-
+ + - \ No newline at end of file + diff --git a/web/style.css b/web/style.css index d128597..37de3c9 100644 --- a/web/style.css +++ b/web/style.css @@ -2,7 +2,7 @@ body { margin: 0; padding: 10px; min-height: 100vh; - background-color: #333; + background-color: #49414b; color: #2d3748; display: flex; justify-content: center; @@ -39,6 +39,11 @@ body { width: 100%; } +.game-window { + height: 480px; + border-bottom: 2px solid #2d3748; +} + .game-window canvas { display: block; } @@ -67,7 +72,6 @@ body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; - margin-bottom: 20px; } .control-item { @@ -122,18 +126,13 @@ body { color: #e53e3e; } -@media (max-width: 640px) { - .container { - width: 100%; - margin: 10px; - border-radius: 8px; - } - - .controls-grid { - grid-template-columns: repeat(2, 1fr); - } +.source-link { + position: relative; + text-align: center; + margin-bottom: 20px; + font-size: 0.9em; +} - .features { - grid-template-columns: 1fr; - } -} \ No newline at end of file +.source-link a { + color: #4a5568; +}