diff options
Diffstat (limited to 'HTanks.hs')
-rw-r--r-- | HTanks.hs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -22,6 +22,8 @@ main = do when (initialized gl) $ do time <- getClockTime + + setup 800 600 runGame gameState $ mainLoop gl time deinitGL gl @@ -44,7 +46,7 @@ mainLoop gl time = do newTime <- liftIO getClockTime - liftIO $ print $ timeDiff newTime time + --liftIO $ print $ timeDiff newTime time when run $ mainLoop gl newTime @@ -65,4 +67,7 @@ handleEvents gl = do handleEvent :: SomeEvent -> IO Bool handleEvent ev | Just QuitEvent <- fromEvent ev = return False + | Just (ResizeEvent w h) <- fromEvent ev = do + resize w h + return True | otherwise = return True |