mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
added button to access new modal for editor config
This commit is contained in:
parent
4cbdc3cb4b
commit
f618338d32
2 changed files with 9 additions and 0 deletions
|
@ -37,3 +37,6 @@ button.btn.btn-xs.btn-inverse#music-button(title="Toggle Music")
|
|||
li.selectable#edit-wizard-settings
|
||||
i.icon-user
|
||||
span(data-i18n="play_level.customize_wizard") Customize Wizard
|
||||
li.selectable#edit-editor-config
|
||||
i.icon-edit
|
||||
span Editor Config
|
||||
|
|
|
@ -2,6 +2,8 @@ View = require 'views/kinds/CocoView'
|
|||
template = require 'templates/play/level/playback'
|
||||
{me} = require 'lib/auth'
|
||||
|
||||
EditorConfigModal = require './modal/editor_config_modal'
|
||||
|
||||
module.exports = class PlaybackView extends View
|
||||
id: "playback-view"
|
||||
template: template
|
||||
|
@ -25,6 +27,7 @@ module.exports = class PlaybackView extends View
|
|||
'click #debug-toggle': 'onToggleDebug'
|
||||
'click #grid-toggle': 'onToggleGrid'
|
||||
'click #edit-wizard-settings': 'onEditWizardSettings'
|
||||
'click #edit-editor-config': 'onEditEditorConfig'
|
||||
'click #music-button': 'onToggleMusic'
|
||||
'click #zoom-in-button': -> Backbone.Mediator.publish('camera-zoom-in') unless @disabled
|
||||
'click #zoom-out-button': -> Backbone.Mediator.publish('camera-zoom-out') unless @disabled
|
||||
|
@ -77,6 +80,9 @@ module.exports = class PlaybackView extends View
|
|||
onEditWizardSettings: ->
|
||||
Backbone.Mediator.publish 'edit-wizard-settings'
|
||||
|
||||
onEditEditorConfig: ->
|
||||
@openModalView(new EditorConfigModal())
|
||||
|
||||
onDisableControls: (e) ->
|
||||
if not e.controls or 'playback' in e.controls
|
||||
@disabled = true
|
||||
|
|
Loading…
Reference in a new issue