diff --git a/src/swarm-tui/Swarm/TUI/Model/Name.hs b/src/swarm-tui/Swarm/TUI/Model/Name.hs index 035ac846e..ecb455ffb 100644 --- a/src/swarm-tui/Swarm/TUI/Model/Name.hs +++ b/src/swarm-tui/Swarm/TUI/Model/Name.hs @@ -92,6 +92,8 @@ data Name InventoryList | -- | The inventory item position in the InventoryList. InventoryListItem Int + | -- | Cacheable scenario preview + ScenarioPreview FilePath | -- | The list of main menu choices. MenuList | -- | The list of achievements. diff --git a/src/swarm-tui/Swarm/TUI/View.hs b/src/swarm-tui/Swarm/TUI/View.hs index b0d6286c8..3201fc56c 100644 --- a/src/swarm-tui/Swarm/TUI/View.hs +++ b/src/swarm-tui/Swarm/TUI/View.hs @@ -17,9 +17,6 @@ module Swarm.TUI.View ( drawModalMenu, drawKeyCmd, - -- * World - drawWorldPane, - -- * Robot panel drawRobotPanel, drawItem, @@ -255,7 +252,9 @@ drawNewGameMenuUI (l :| ls) launchOptions = case displayedFor of drawDescription (SISingle (s, si)) = vBox [ drawMarkdown (nonBlank (s ^. scenarioOperation . scenarioDescription)) - , hCenter . padTop (Pad 1) . vLimit 6 $ hLimitPercent 60 worldPeek + , cached (ScenarioPreview $ si ^. scenarioPath) $ + hCenter . padTop (Pad 1) . vLimit 6 $ + hLimitPercent 60 worldPeek , padTop (Pad 1) table ] where