diff options
author | Griffin Smith <grfn@gws.fyi> | 2021-11-08T01·15-0500 |
---|---|---|
committer | grfn <grfn@gws.fyi> | 2021-11-08T03·31+0000 |
commit | 56718d14b157a18a6a907d8546ee0c0bab96be30 (patch) | |
tree | ed5ffe94907a4ec39b253059d3e05ccbe7b1f8ed | |
parent | 63524745c9909e841cbb35a402d45fa2d28a0f42 (diff) |
fix(gs/xanthous): Don't take up half-width for prompts r/3023
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 <grfn@gws.fyi> Tested-by: BuildkiteCI
-rw-r--r-- | users/grfn/xanthous/src/Xanthous/Game/Draw.hs | 6 |
1 files 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 b9590ba40438..5b51ca67292b 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) -> |