From 8a0613251e4980c9a2cf5e8962dae3b6eb139ff4 Mon Sep 17 00:00:00 2001
From: Rick Parrish <124-Ree@users.noreply.gitlab.synchro.net>
Date: Sat, 3 Dec 2022 21:21:13 +0000
Subject: [PATCH] Ree/games fixes

---
 webv4/pages/003-games.xjs | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/webv4/pages/003-games.xjs b/webv4/pages/003-games.xjs
index f7372f11e3..af6f1b419e 100644
--- a/webv4/pages/003-games.xjs
+++ b/webv4/pages/003-games.xjs
@@ -25,7 +25,11 @@
 
 ?>
 
+<?xjs if (settings.ftelnet_menubar) { ?>
+<style>.fTelnetConnectButton { display : none; }</style>
+<?xjs } else { ?>
 <style>.fTelnetStatusBar { display : none; }</style>
+<?xjs } ?>
 
 <a name="fTelnet"></a>
 <div id="fTelnetContainer" class="fTelnetContainer" style="margin-bottom:1em;"></div>
@@ -86,8 +90,15 @@
             $(a).text(xx.n);
             $(a).click(function (evt) {
                 if (xx.c.toLowerCase() === 'msweeper') {
-                    // Resize client to support a level 5 game of minesweeper
-                    fTelnet.Crt.SetScreenSize(80, 35);
+                    // Resize client to support a level 5 game of minesweeper, if necessary
+                    if (fTelnet.Crt.ScreenRows < 35) {
+                        // Switch to 80x35, which fits a full level 5.0 game
+                        fTelnet.Crt.SetScreenSize(80, 35);
+
+                        // Call SetFont, which will switch to a smaller font if the new 35 row
+                        // client is too tall for the browser window
+                        fTelnet.Crt.SetFont(fTelnet.Crt.Font.Name);
+                    }
                 }
                 launchXtrn(xx.c);
             });
-- 
GitLab