From f618338d3283beec567b9f211532592feb6b38f2 Mon Sep 17 00:00:00 2001 From: Dominik Kundel Date: Fri, 14 Mar 2014 00:53:29 +0100 Subject: [PATCH] added button to access new modal for editor config --- app/templates/play/level/playback.jade | 3 +++ app/views/play/level/playback_view.coffee | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/app/templates/play/level/playback.jade b/app/templates/play/level/playback.jade index 4d00d230f..c5a88171e 100644 --- a/app/templates/play/level/playback.jade +++ b/app/templates/play/level/playback.jade @@ -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 diff --git a/app/views/play/level/playback_view.coffee b/app/views/play/level/playback_view.coffee index f9c13a9e3..46a5f3a77 100644 --- a/app/views/play/level/playback_view.coffee +++ b/app/views/play/level/playback_view.coffee @@ -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