Add opening/closing sounds to HintsView

This commit is contained in:
Imperadeiro98 2016-09-07 14:13:29 +01:00
parent d223143557
commit 5922f0947b

View file

@ -38,6 +38,7 @@ module.exports = class HintsView extends CocoView
afterRender: -> afterRender: ->
@$el.toggleClass('hide', @hintsState.get('hidden')) @$el.toggleClass('hide', @hintsState.get('hidden'))
super() super()
@playSound 'game-menu-open'
getProcessedHint: -> getProcessedHint: ->
language = @session.get('codeLanguage') language = @session.get('codeLanguage')
@ -69,7 +70,9 @@ module.exports = class HintsView extends CocoView
@playSound 'menu-button-click' @playSound 'menu-button-click'
@updateHintTimer() @updateHintTimer()
hideView: -> @hintsState?.set('hidden', true) hideView: ->
@hintsState?.set('hidden', true)
@playSound 'game-menu-close'
visibilityChanged: (e) -> visibilityChanged: (e) ->
@updateHintTimer() @updateHintTimer()
@ -91,4 +94,3 @@ module.exports = class HintsView extends CocoView
@state.set('hintsUsed', hintsUsed) @state.set('hintsUsed', hintsUsed)
clearInterval(@timerIntervalID) clearInterval(@timerIntervalID)
@state.set('hintsViewTime', hintsViewTime) @state.set('hintsViewTime', hintsViewTime)