From 2e3ecf5acf2af7e734655f088d050152dd4ed1b4 Mon Sep 17 00:00:00 2001 From: Alex Warren Date: Tue, 7 May 2013 18:49:38 +0100 Subject: [PATCH] Hide player UI elements when initialising a game until they are explicitly turned on --- Legacy/LegacyGame.vb | 3 +++ Player/Player.vb | 3 --- PlayerController/playercore.css | 3 +++ WebPlayer/Mobile/player.css | 1 + WorldModel/WorldModel/WorldModel.cs | 6 ++++++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Legacy/LegacyGame.vb b/Legacy/LegacyGame.vb index 956d43cde..8bbc5f9bf 100644 --- a/Legacy/LegacyGame.vb +++ b/Legacy/LegacyGame.vb @@ -11834,6 +11834,9 @@ ErrorHandler: GameName = RetrieveParameter(Lines(GetDefineBlock("game").StartLine), NullThread) m_player.UpdateGameName(GameName) + m_player.Show("Panes") + m_player.Show("Location") + m_player.Show("Command") SetUpGameObject() SetUpOptions() diff --git a/Player/Player.vb b/Player/Player.vb index 870d734df..8535a3050 100644 --- a/Player/Player.vb +++ b/Player/Player.vb @@ -107,9 +107,6 @@ Public Class Player If fromEditor Then ctlToolbar.SimpleMode = editorSimpleMode End If - SetPanesVisible(True) - SetCommandVisible(True) - SetLocationVisible(True) SetStatusText("") LocationUpdated("") m_menu.ClearWindowMenu() diff --git a/PlayerController/playercore.css b/PlayerController/playercore.css index 71859b625..8a1eba53c 100644 --- a/PlayerController/playercore.css +++ b/PlayerController/playercore.css @@ -71,6 +71,7 @@ div#gamePanes padding: 2px; background: #F9F9FF; min-height: 100%; + display: none; } div#status { @@ -86,6 +87,7 @@ div#status } div#location { + display: none; padding-left: 4px; padding-top: 4px; } @@ -132,6 +134,7 @@ div#divOutput div#txtCommandDiv { height: 40px; + display: none; } #txtCommand { diff --git a/WebPlayer/Mobile/player.css b/WebPlayer/Mobile/player.css index f9521bcf6..9d50f5c8c 100644 --- a/WebPlayer/Mobile/player.css +++ b/WebPlayer/Mobile/player.css @@ -74,6 +74,7 @@ div#txtCommandDiv opacity: 0.8; position: static; margin-left: 0px; + display: none; } #txtCommand { diff --git a/WorldModel/WorldModel/WorldModel.cs b/WorldModel/WorldModel/WorldModel.cs index 2271028d6..66b0644d8 100644 --- a/WorldModel/WorldModel/WorldModel.cs +++ b/WorldModel/WorldModel/WorldModel.cs @@ -543,6 +543,12 @@ public void Begin() try { m_timerRunner = new TimerRunner(this, !m_loadedFromSaved); + if (Version <= WorldModelVersion.v540) + { + PlayerUI.Show("Panes"); + PlayerUI.Show("Location"); + PlayerUI.Show("Command"); + } if (m_elements.ContainsKey(ElementType.Function, "InitInterface")) RunProcedure("InitInterface"); if (!m_loadedFromSaved) {