diff options
Diffstat (limited to 'src/Xanthous/Game/Draw.hs')
-rw-r--r-- | src/Xanthous/Game/Draw.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Xanthous/Game/Draw.hs b/src/Xanthous/Game/Draw.hs index 5a2f773c1b18..6527af743953 100644 --- a/src/Xanthous/Game/Draw.hs +++ b/src/Xanthous/Game/Draw.hs @@ -26,7 +26,13 @@ import Xanthous.Orphans () drawMessages :: MessageHistory -> Widget Name drawMessages NoMessageHistory = emptyWidget drawMessages (MessageHistory _ False) = emptyWidget -drawMessages (MessageHistory (lastMessage :| _) True) = str $ unpack lastMessage +drawMessages (MessageHistory (lastMessage :| _) True) = txt lastMessage + +-- an attempt to still take up a row even when no messages +-- drawMessages msgs = vLimit 1 . Widget Greedy Fixed . render $ case msgs of +-- NoMessageHistory -> padTop (Pad 2) $ str " " +-- (MessageHistory _ False) -> padTop (Pad 2) $ str " " +-- (MessageHistory (lastMessage :| _) True) -> txt lastMessage drawEntities :: (Draw a, Show a) => EntityMap a -> Widget Name drawEntities em@(fromNullable . positions -> Just entityPositions) |