mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 19:06:59 -05:00
Add opening/closing sounds to HintsView
This commit is contained in:
parent
d223143557
commit
5922f0947b
1 changed files with 8 additions and 6 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue