mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Added a thing which highlights the guide every 5 minutes until clicked. Fixed #11.
This commit is contained in:
parent
d8e6c7f550
commit
c4a56dc9a5
1 changed files with 15 additions and 1 deletions
|
@ -24,7 +24,7 @@ module.exports = class ControlBarView extends View
|
|||
'click #restart-button': ->
|
||||
window.tracker?.trackEvent 'Clicked Restart', level: @worldName, label: @worldName
|
||||
@showRestartModal()
|
||||
|
||||
|
||||
'click #next-game-button': ->
|
||||
Backbone.Mediator.publish 'next-game-pressed'
|
||||
|
||||
|
@ -64,9 +64,23 @@ module.exports = class ControlBarView extends View
|
|||
c.homeLink = "/play/ladder/" + levelID
|
||||
c
|
||||
|
||||
afterRender: ->
|
||||
super()
|
||||
@guideHighlightInterval ?= setInterval @onGuideHighlight, 5 * 60 * 1000
|
||||
|
||||
destroy: ->
|
||||
clearInterval @guideHighlightInterval if @guideHighlightInterval
|
||||
super()
|
||||
|
||||
onGuideHighlight: =>
|
||||
return if @destroyed or @guideShownOnce
|
||||
@$el.find('#docs-button').hide().show('highlight', 4000)
|
||||
|
||||
showGuideModal: ->
|
||||
options = {docs: @level.get('documentation'), supermodel: @supermodel}
|
||||
@openModalView(new DocsModal(options))
|
||||
clearInterval @guideHighlightInterval
|
||||
@guideHighlightInterval = null
|
||||
|
||||
showMultiplayerModal: ->
|
||||
@openModalView(new MultiplayerModal(session: @session, playableTeams: @playableTeams, level: @level, ladderGame: @ladderGame))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue