This commit is contained in:
2021-12-09 14:43:38 +00:00
parent 24a0cc289f
commit 4324d298d4
+6 -6
View File
@@ -51,12 +51,12 @@ seedStartOptions =
trySeedFromClipboard :: Universe -> IO (Maybe Universe)
trySeedFromClipboard u = do
mcstr <- getClipboardString
case mcstr of
Nothing -> pushScreen (seedStartMenu "INPUT UNUSABLE") (u & menuLayers %~ tail)
Just str -> do
case readMaybe str of
Nothing -> pushScreen (seedStartMenu "INPUT UNUSABLE") (u & menuLayers %~ tail)
Just i -> return . Just $ startSeedGame i u
case mcstr >>= readMaybe of
Nothing -> sayinputunusable
Just i -> return . Just $ startSeedGame i u
where
sayinputunusable = pushScreen (seedStartMenu "INPUT UNUSABLE, EXPECTING INTEGER")
(u & menuLayers %~ tail)
slTitleOptions :: String -> [MenuOption] -> ScreenLayer
slTitleOptions title ops = slTitleOptionsEff title ops (popScreen . writeConfig)