mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-02 00:43:34 -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
|
@ -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