mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-01 15:50:11 -04:00
Fixed bug with game menu not highlighting guide tab.
This commit is contained in:
parent
4804f3965f
commit
621e143544
2 changed files with 3 additions and 4 deletions
app/views/play
|
@ -97,7 +97,7 @@ module.exports = class ControlBarView extends CocoView
|
|||
c.homeLink = @homeLink
|
||||
c
|
||||
|
||||
showGameMenuModal: (tab='guide') ->
|
||||
showGameMenuModal: (e, tab=null) ->
|
||||
gameMenuModal = new GameMenuModal level: @level, session: @session, supermodel: @supermodel, showTab: tab
|
||||
@openModalView gameMenuModal
|
||||
@listenToOnce gameMenuModal, 'change-hero', ->
|
||||
|
@ -111,9 +111,9 @@ module.exports = class ControlBarView extends CocoView
|
|||
Backbone.Mediator.publish 'router:navigate', route: @homeLink, viewClass: @homeViewClass, viewArgs: @homeViewArgs
|
||||
|
||||
onClickMultiplayer: (e) ->
|
||||
@showGameMenuModal 'multiplayer'
|
||||
@showGameMenuModal e, 'multiplayer'
|
||||
|
||||
onClickSignupButton: ->
|
||||
onClickSignupButton: (e) ->
|
||||
window.tracker?.trackEvent 'Started Signup', category: 'Play Level', label: 'Control Bar', level: @levelID
|
||||
|
||||
onDisableControls: (e) -> @toggleControls e, false
|
||||
|
|
|
@ -23,7 +23,6 @@ module.exports = class GameMenuModal extends ModalView
|
|||
|
||||
constructor: (options) ->
|
||||
super options
|
||||
@options.showTab = options.showTab
|
||||
@options.levelID = @options.level.get('slug')
|
||||
@options.startingSessionHeroConfig = $.extend {}, true, (@options.session.get('heroConfig') ? {})
|
||||
Backbone.Mediator.publish 'music-player:enter-menu', terrain: @options.level.get('terrain', true) ? 'Dungeon'
|
||||
|
|
Loading…
Add table
Reference in a new issue