mainMenu :: (StartStop t) => EvStream t Float -> EvStream t [Event] -> Behavior t (Screen t)
mainMenu clock ev = do
  let clickButton = renderButton extentClick "Click Example"
      clickButtonEvent = void $ ffilter (any (isClickedBy extentClick)) ev
      enterClick = samples ((exampleToScreen clock ev =<< (clickExample ev)) <$ clickButtonEvent)

      mouseTrackButton = renderButton extentMouseTracker "Mouse Tracker"
      mouseButtonEvent = void $ ffilter (any (isClickedBy extentMouseTracker)) ev
      enterMouse = samples ((exampleToScreen clock ev =<< (mouseTrackerExample clock ev)) <$ mouseButtonEvent)

      mouseTrailButton = renderButton extentMouseTrail "Mouse Trail"
      mouseTrailEvent = void $ ffilter (any (isClickedBy extentMouseTrail)) ev
      enterTrail = samples ((exampleToScreen clock ev =<< (mouseTrailExample clock ev)) <$ mouseTrailEvent)

  return $ Screen (return $ clickButton <> mouseTrackButton <> mouseTrailButton) (leftmost [enterClick, enterMouse, enterTrail])
mainMenu :: (StartStop t) => EvStream t Float -> EvStream t [Event] -> Behavior t (Screen t)
mainMenu clock ev = do
  let clickButton = renderButton extentClick "Click Example"
      clickButtonEvent = void $ ffilter (any (isClickedBy extentClick)) ev
      enterClick = samples ((exampleToScreen clock ev =<< (clickExample ev)) <$ clickButtonEvent)

      mouseTrackButton = renderButton extentMouseTracker "Mouse Tracker"
      mouseButtonEvent = void $ ffilter (any (isClickedBy extentMouseTracker)) ev
      enterMouse = samples ((exampleToScreen clock ev =<< (mouseTrackerExample clock ev)) <$ mouseButtonEvent)

      mouseTrailButton = renderButton extentMouseTrail "Mouse Trail"
      mouseTrailEvent = void $ ffilter (any (isClickedBy extentMouseTrail)) ev
      enterTrail = samples ((exampleToScreen clock ev =<< (mouseTrailExample clock ev)) <$ mouseTrailEvent)

  return $ Screen (return $ clickButton <> mouseTrackButton <> mouseTrailButton) (leftmost [enterClick, enterMouse, enterTrail])
mainMenu clock ev = do
  let clickButton = renderButton extentClick "Click Example"
      clickButtonEvent = void $ ffilter (any (isClickedBy extentClick)) ev
      enterClick = samples ((exampleToScreen clock ev =<< (clickExample ev)) <$ clickButtonEvent)

      mouseTrackButton = renderButton extentMouseTracker "Mouse Tracker"
      mouseButtonEvent = void $ ffilter (any (isClickedBy extentMouseTracker)) ev
      enterMouse = samples ((exampleToScreen clock ev =<< (mouseTrackerExample clock ev)) <$ mouseButtonEvent)

      mouseTrailButton = renderButton extentMouseTrail "Mouse Trail"
      mouseTrailEvent = void $ ffilter (any (isClickedBy extentMouseTrail)) ev
      enterTrail = samples ((exampleToScreen clock ev =<< (mouseTrailExample clock ev)) <$ mouseTrailEvent)

  return $ Screen (return $ clickButton <> mouseTrackButton <> mouseTrailButton) (leftmost [enterClick, enterMouse, enterTrail])