         @view.processResult(result)
       @showView()
 
-  isCurrentView: (view) =>
+  isCurrentView: (view) ->
     return @view == view
 
-  getScreen: () =>
+  getScreen: () ->
     @screen
 
   windowKeyPress: (event) =>

    @showView()


  showView: () =>
    #console.log("View: #{@view.name}")
    @view.doLayout()
    @view.setButtons(@buttonGrid)
    @view.draw()
    $('.game-container .eight-bit-panel').toggle(@view instanceof SplashView);

  pushView: (view) =>
    @stack.unshift(@view)
    @view = view
    @showView()

  popView: (result) =>
    @scene.removeView @view
    parent = @stack.shift()
    if (parent != null)

        @view.processResult(result)
      @showView()

  swapView: (result) ->
    @view = view
    if (result != null)
      @view.processResult(result)
    @showView()

  popToTopView: (result) ->
    if (@stack.length > 0)
      @view = @stack.shift()
      while (@stack.length > 0)
