diff --git a/Beispiele/animatedGUI.hs b/Beispiele/animatedGUI.hs new file mode 100644 index 0000000..939fe6f --- /dev/null +++ b/Beispiele/animatedGUI.hs @@ -0,0 +1,13 @@ +import Data.Monoid +import Graphics.Gloss +import Graphics.Gloss.Data.Color (makeColor, red) + +main :: IO () +main = animate (InWindow "Spin around" (500,500) (100,100)) + (makeColor 0.9 0.9 0.9 1) + (\time -> + Pictures [ Color red $ ThickCircle 500 1000 + , Rotate (time/60*360) + $ Text + $ show (round time) <> " Seconds" + ]) diff --git a/Beispiele/staticGUI.hs b/Beispiele/staticGUI.hs new file mode 100644 index 0000000..6ab5367 --- /dev/null +++ b/Beispiele/staticGUI.hs @@ -0,0 +1,9 @@ +import Graphics.Gloss +import Graphics.Gloss.Data.Color (makeColor, red) + +main :: IO () +main = display (InWindow "Hello World" (500,500) (100,100)) + (makeColor 0.9 0.9 0.9 1) + (Pictures [ Color red (Circle 1000) + , Text "Hello World Text" + ])