From 0f754eb2a07062e8490ae3af04e7c7ff4d94cc55 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 22 Dec 2019 22:42:05 -0500 Subject: Fix rendering string prompts Rendering an editor with txtWrap makes brick blow up because editors have an internal viewport, but txtWrap advertises an infinite width. --- src/Xanthous/Game/Draw.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Xanthous/Game/Draw.hs') diff --git a/src/Xanthous/Game/Draw.hs b/src/Xanthous/Game/Draw.hs index 7947c6efe917..e2390c47bf15 100644 --- a/src/Xanthous/Game/Draw.hs +++ b/src/Xanthous/Game/Draw.hs @@ -48,7 +48,7 @@ drawPromptState NoPrompt = emptyWidget drawPromptState (WaitingPrompt msg (Prompt _ pt ps pri _)) = case (pt, ps, pri) of (SStringPrompt, StringPromptState edit, _) -> - txtWrap msg <+> renderEditor (txtWrap . fold) True edit + txtWrap msg <+> txt " " <+> renderEditor (txt . fold) True edit (SDirectionPrompt, DirectionPromptState, _) -> txtWrap msg (SContinue, _, _) -> txtWrap msg (SMenu, _, menuItems) -> -- cgit 1.4.1