From 56718d14b157a18a6a907d8546ee0c0bab96be30 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 7 Nov 2021 20:15:07 -0500 Subject: [PATCH] fix(gs/xanthous): Don't take up half-width for prompts txtWrap takes up half the available width in the viewport, causing the input for prompts to display way too far to the right of the actual prompt. I'm not aware of any actual mutiline prompts, so using txt here makes way more sense. Change-Id: I7f62066f1b07b5d6ba2c7ffed77c87ae33b1dfa5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3814 Reviewed-by: grfn Tested-by: BuildkiteCI --- users/grfn/xanthous/src/Xanthous/Game/Draw.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/users/grfn/xanthous/src/Xanthous/Game/Draw.hs b/users/grfn/xanthous/src/Xanthous/Game/Draw.hs index b9590ba40..5b51ca672 100644 --- a/users/grfn/xanthous/src/Xanthous/Game/Draw.hs +++ b/users/grfn/xanthous/src/Xanthous/Game/Draw.hs @@ -44,10 +44,8 @@ drawPromptState NoPrompt = emptyWidget drawPromptState (WaitingPrompt msg (Prompt _ pt ps pri _)) = case (pt, ps, pri) of (SStringPrompt, StringPromptState edit, mDef) -> - txtWrap msg - <+> txt " " - <+> txt (maybe "" (\def -> "(default: " <> def <> ")") mDef) - <+> txt " " + txt msg + <+> txt (maybe "" (\def -> "(default: " <> def <> ") ") mDef) <+> renderEditor (txt . fold) True edit (SDirectionPrompt, DirectionPromptState, _) -> txtWrap msg (SMenu, _, menuItems) ->