Skip to content

Commit

Permalink
Add debug screen
Browse files Browse the repository at this point in the history
  • Loading branch information
grancalavera committed Jan 12, 2019
1 parent 065f349 commit 8ecb87e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/Labyrinth/UI/Debug.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module Labyrinth.UI.Debug
( draw
)
where

import Brick
import Lens.Micro ( (^.) )
import qualified Labyrinth.Store as S
import Labyrinth.Store ( Store, State(..) )

draw :: Store e -> Widget n
draw store = vBox [state, modals]
where
state = txt $ case (store ^. S.state) of
Splash _ -> "State: Splash"
Setup _ -> "State: Setup"
Plan _ -> "State: Plan"
_ -> "State: not implemented"
modals = str $ show $ store ^. S.modal

0 comments on commit 8ecb87e

Please sign in to comment.