From f81b5f53085af5057bd6a388a101551d396e23f9 Mon Sep 17 00:00:00 2001 From: Karl Ostmo Date: Fri, 24 Mar 2023 00:32:48 -0700 Subject: [PATCH] Display scenario for obtained achievement --- src/Swarm/TUI/View/Achievement.hs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Swarm/TUI/View/Achievement.hs b/src/Swarm/TUI/View/Achievement.hs index a48091695..faabc9c2e 100644 --- a/src/Swarm/TUI/View/Achievement.hs +++ b/src/Swarm/TUI/View/Achievement.hs @@ -87,12 +87,20 @@ singleAchievementDetails attainedMap x = Nothing -> emptyWidget Just attainment -> padTop (Pad 1) $ - hBox - [ txt "Obtained: " - , withAttr cyanAttr $ - str $ - formatTime defaultTimeLocale "%l:%M%P on %b %e, %Y" $ - attainment ^. obtainedAt + vBox + [ hBox + [ txt "Obtained: " + , withAttr cyanAttr $ + str $ + formatTime defaultTimeLocale "%l:%M%P on %b %e, %Y" $ + attainment ^. obtainedAt + ] + , flip (maybe emptyWidget) (attainment ^. maybeScenarioPath) $ \s -> + hBox + [ txt "Scenario: " + , withAttr cyanAttr $ + str s + ] ] , padTop (Pad 1) $ hBox