added Beispielcode for GUI
This commit is contained in:
parent
823ddb3991
commit
003c995794
13
Beispiele/animatedGUI.hs
Normal file
13
Beispiele/animatedGUI.hs
Normal file
@ -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"
|
||||
])
|
9
Beispiele/staticGUI.hs
Normal file
9
Beispiele/staticGUI.hs
Normal file
@ -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"
|
||||
])
|
Loading…
Reference in New Issue
Block a user