You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

  1. module Main where
  2. import Raylib.Core
  3. import Raylib.Types
  4. import Raylib.Util
  5. import Raylib.Core.Text
  6. import Raylib.Util.Colors
  7. import Data.IORef
  8. import State
  9. import Board
  10. import UI
  11. main :: IO ()
  12. main = do
  13. let pattern = BGPatternGrid { bg'vSpacing = 25
  14. , bg'thickness = 1
  15. , bg'hSpacing = 25
  16. , bg'fillColor = BoardColor rayWhite
  17. , bg'drawColor = BoardColor lightGray
  18. }
  19. let pathTest = Path { path'thickness= 3
  20. , path'points= map (Point . (uncurry Vector2))
  21. [(0,0), (1, 3), (0.5, 2)]
  22. , path'color= BoardColor purple
  23. }
  24. appState <- newIORef $ AppState (ActionDraw (Path [] 1.0 $ BoardColor black))
  25. (Board "Untitled" pattern [pathTest])
  26. ""
  27. (Point $ Vector2 0.0 0.0)
  28. 1.1
  29. withWindow 800 600 "Noteboard" 60
  30. (\_ -> do
  31. setWindowState [WindowResizable, WindowMaximized]
  32. whileWindowOpen0
  33. ( drawing
  34. ( do
  35. drawUI appState
  36. )
  37. )
  38. )