Created
January 19, 2015 18:25
-
-
Save ozanmakes/17f16ebd78064d2931b9 to your computer and use it in GitHub Desktop.
Thrust menu example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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 | |
,Separator | |
,Item "Resize" $ W.resize 1024 768]] | |
W.setTitle "Thrust Haskell" | |
W.show | |
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