added button to access new modal for editor config

This commit is contained in:
Dominik Kundel 2014-03-14 00:53:29 +01:00
parent 4cbdc3cb4b
commit f618338d32
2 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -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