switch from ncurses to brick #1
|
@ -49,7 +49,7 @@ module Mtlstats.Prompt (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Brick.Types (BrickEvent (VtyEvent), Location (Location), Widget)
|
import Brick.Types (BrickEvent (VtyEvent), Location (Location), Widget)
|
||||||
import Brick.Widgets.Core (hBox, showCursor, str)
|
import Brick.Widgets.Core (showCursor, str, vBox)
|
||||||
import Control.Monad (when)
|
import Control.Monad (when)
|
||||||
import Control.Monad.Extra (whenJust)
|
import Control.Monad.Extra (whenJust)
|
||||||
import Control.Monad.State.Class (gets, modify)
|
import Control.Monad.State.Class (gets, modify)
|
||||||
|
@ -218,9 +218,9 @@ selectPrompt params = Prompt
|
||||||
desc = spElemDesc params x
|
desc = spElemDesc params x
|
||||||
in str $ "F" ++ show n ++ ") " ++ desc)
|
in str $ "F" ++ show n ++ ") " ++ desc)
|
||||||
results
|
results
|
||||||
in hBox $
|
in vBox $
|
||||||
[ showCursor () (Location (0, pWidth)) $ str pStr
|
[ showCursor () (Location (pWidth, 0)) $ str pStr
|
||||||
, str ""
|
, str " "
|
||||||
, str $ spSearchHeader params
|
, str $ spSearchHeader params
|
||||||
] ++ fmtRes
|
] ++ fmtRes
|
||||||
, promptProcessChar = spProcessChar params
|
, promptProcessChar = spProcessChar params
|
||||||
|
|
Loading…
Reference in New Issue
Block a user