This commit is contained in:
Joscha 2018-09-30 21:39:50 +00:00
parent cad2f5741f
commit 36e90895f0
2 changed files with 3 additions and 4 deletions

View file

@ -35,9 +35,8 @@ closeBehavior f s e = f s e -- wrapper around anoth
popupBehavior :: Popup RName (UIState -> NewState) -> UIState -> VTY.Event -> NewState popupBehavior :: Popup RName (UIState -> NewState) -> UIState -> VTY.Event -> NewState
popupBehavior p s (VTY.EvKey VTY.KEnter []) = popupBehavior p s (VTY.EvKey VTY.KEnter []) =
case popupSelection p of case popupSelection p of
Nothing -> B.continue s{errorPopup=Nothing} Nothing -> B.continue s{errorPopup=Nothing}
Just action -> do Just action -> action s{errorPopup=Nothing}
action s{errorPopup=Nothing}
popupBehavior p s e = do popupBehavior p s e = do
newPopup <- handlePopupEvent e p newPopup <- handlePopupEvent e p
B.continue s{errorPopup=Just newPopup} B.continue s{errorPopup=Just newPopup}

View file

@ -11,9 +11,9 @@ import qualified Graphics.Vty as VTY
import Text.Megaparsec import Text.Megaparsec
import TaskMachine.Task import TaskMachine.Task
import TaskMachine.UI.Stuff
import TaskMachine.UI.TaskList import TaskMachine.UI.TaskList
import TaskMachine.UI.Types import TaskMachine.UI.Types
import TaskMachine.UI.Stuff
startEdit :: UIState -> UIState startEdit :: UIState -> UIState
startEdit s = startEdit s =