Skip to content
Browse files

non-working menu Functor

  • Loading branch information...
1 parent e67eb07 commit 14cebcd308dc32d4db71d83f626d75eee1f84431 Nik Nyby committed Apr 26, 2010
Showing with 15 additions and 1 deletion.
  1. +15 −1 Menu.hs
View
16 Menu.hs
@@ -26,8 +26,8 @@ data MmaMenu = MmaMenu
-- stepper
frameWindow :: MmaWindow,
- prevFrameButton :: MmaButton,
nextFrameButton :: MmaButton,
+ prevFrameButton :: MmaButton,
saveButton :: MmaButton
} deriving Show
@@ -51,6 +51,20 @@ initialMenu = MmaMenu {
prevFrameButton = MmaButton (Rectangle 535 15 60 70) False
}
+ {-
+instance Functor MmaMenu where
+ fmap f m = m {
+ playButton = f (playButton m),
+ nextSprtButton = f (nextSprtButton m),
+ prevSprtButton = f (prevSprtButton m),
+ nextBgButton = f (nextBgButton m),
+ prevBgButton = f (prevBgButton m),
+ nextFrameButton = f (nextFrameButton m),
+ prevFrameButton = f (prevFrameButton m),
+ saveButton = f (saveButton m)
+ }
+ -}
+
data MmaButton = MmaButton
{
buttonRect :: Rectangle,

0 comments on commit 14cebcd

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