about summary refs log tree commit diff
path: root/src/Xanthous/Game/State.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/Game/State.hs')
-rw-r--r--src/Xanthous/Game/State.hs19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/Xanthous/Game/State.hs b/src/Xanthous/Game/State.hs
index 5ddb7de7e9b8..3b401d366d10 100644
--- a/src/Xanthous/Game/State.hs
+++ b/src/Xanthous/Game/State.hs
@@ -10,6 +10,7 @@ module Xanthous.Game.State
   , revealedPositions
   , messageHistory
   , randomGen
+  , activePanel
   , promptState
   , characterEntityID
   , GamePromptState(..)
@@ -383,6 +384,7 @@ instance
 
 --------------------------------------------------------------------------------
 
+
 data DebugState = DebugState
   { _allRevealed :: !Bool
   }
@@ -402,8 +404,12 @@ data GameState = GameState
   , _characterEntityID :: !EntityID
   , _messageHistory    :: !MessageHistory
   , _randomGen         :: !StdGen
+
+    -- | The active panel displayed in the UI, if any
+  , _activePanel       :: !(Maybe Panel)
+
   , _promptState       :: !(GamePromptState AppM)
-  , _debugState        :: DebugState
+  , _debugState        :: !DebugState
   }
   deriving stock (Show, Generic)
   deriving anyclass (NFData)
@@ -437,14 +443,3 @@ instance (MonadIO m) => MonadIO (AppT m) where
 --------------------------------------------------------------------------------
 
 makeLenses ''DebugState
-
---------------------------------------------------------------------------------
-
--- saveGame :: GameState -> LByteString
--- saveGame = Zlib.compress . JSON.encode
-
--- loadGame :: LByteString -> Maybe GameState
--- loadGame = JSON.decode . Zlib.decompress
-
--- saved :: Prism' LByteString GameState
--- saved = prism' saveGame loadGame