Skip to content
Browse files

:I

  • Loading branch information...
1 parent 8e06d69 commit 95a5b01b7d623a8e86ce417687038f1214d6b7dc Nik Nyby committed Apr 18, 2010
Showing with 12 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 Graphics.hs
  3. +9 −0 Render.hs
  4. +1 −1 Util.hs
View
1 .gitignore
@@ -4,3 +4,4 @@ mma
*.swp
\#*\#
.\#*
+*~
View
2 Graphics.hs
@@ -75,7 +75,7 @@ loadAllTextures = do
prevBgButtonTexture = downarrow,
nextFrameButtonTexture = uparrow,
- prevFramButtonTexture = downarrow
+ prevFrameButtonTexture = downarrow
} )
freeTexture :: MmaTexture -> IO ()
View
9 Render.hs
@@ -41,10 +41,19 @@ drawSprite s = do
renderPrimitive Quads $ mapM_ vertex $ selectPoints s
else return ()
+-- TODO: is there a better way????
drawMenu :: MmaMenu -> MmaTextures -> IO ()
drawMenu m t = do
drawTexture 0 0 (menuTexture t) 1
drawButton (playButton m) (playButtonTexture t)
+ drawButton (saveButton m) (saveButtonTexture t)
+ drawButton (nextSprtButton m) (nextSprtButtonTexture t)
+ drawButton (prevSprtButton m) (prevSprtButtonTexture t)
+ drawButton (nextBgButton m) (nextBgButtonTexture t)
+ drawButton (prevBgButton m) (prevBgButtonTexture t)
+ drawButton (nextFrameButton m) (nextFrameButtonTexture t)
+ drawButton (prevFrameButton m) (prevFrameButtonTexture t)
+
drawButton :: MmaButton -> MmaTexture -> IO ()
drawButton (MmaButton r _) tex = do
View
2 Util.hs
@@ -58,5 +58,5 @@ data MmaTextures = MmaTextures
nextBgButtonTexture :: MmaTexture,
prevBgButtonTexture :: MmaTexture,
nextFrameButtonTexture :: MmaTexture,
- prevFramButtonTexture :: MmaTexture
+ prevFrameButtonTexture :: MmaTexture
} deriving Show

0 comments on commit 95a5b01

Please sign in to comment.
Something went wrong with that request. Please try again.