wait for keypress to clear report

This commit is contained in:
Jonathan Lamothe 2019-09-03 17:54:20 -04:00
parent 6c17d88353
commit acb3be8427

View File

@ -23,6 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
module Mtlstats.Events (handleEvent) where
import Control.Monad (when)
import Control.Monad.Trans.State (gets, modify)
import Data.Char (toUpper)
import Lens.Micro ((^.), (.~))
@ -72,7 +73,12 @@ handleEvent e = gets (view progMode) >>= \case
modify updateGameStats
return True
| otherwise -> do
modify $ progMode .~ MainMenu
when
(case e of
C.EventCharacter _ -> True
C.EventSpecialKey _ -> True
_ -> False) $
modify $ progMode .~ MainMenu
return True
overtimePrompt :: C.Event -> Action (Maybe Bool)