Skip to content

Instantly share code, notes, and snippets.

Created Jan 19, 2015
What would you like to do?
Thrust menu example
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad.IO.Class (liftIO)
import Graphics.UI.Thrust
import Graphics.UI.Thrust.SimpleMenu
import qualified Graphics.UI.Thrust.Window as W
setup :: Window -> UI ()
setup w =
do W.create
buildMenu [Menu "Application"
[Item "About Thrust Haskell" . liftIO $
putStrLn "Thrust Haskell 0.0.1"]
,Menu "Window"
[Item "Maximize" W.maximize
,Item "Minimize" W.minimize
,Item "Restore" W.restore
,Item "Resize" $ W.resize 1024 768]]
W.setTitle "Thrust Haskell"
W.setFocus True
main :: IO ()
main = startGUI defaultConfig setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment