diff --git a/app/styles/play/play-level-view.sass b/app/styles/play/play-level-view.sass index a0a560ff9..ba0ff6a37 100644 --- a/app/styles/play/play-level-view.sass +++ b/app/styles/play/play-level-view.sass @@ -12,6 +12,10 @@ $level-resize-transition-time: 0.5s &.real-time // Hmm, somehow the #page-container is cutting us off by ~17px on the right, looks a bit off. + + &.real-time.game-dev + #canvas-wrapper + width: 80% #canvas-wrapper width: 100% @@ -294,6 +298,13 @@ $level-resize-transition-time: 0.5s right: 0 left: 0 bottom: 0 + + #how-to-play-game-dev-panel + position: absolute + right: 0 + top: 52px + width: 20% + bottom: 38px html.fullscreen-editor #level-view diff --git a/app/templates/play/play-level-view.jade b/app/templates/play/play-level-view.jade index ad0687b5b..ef8f92ee5 100644 --- a/app/templates/play/play-level-view.jade +++ b/app/templates/play/play-level-view.jade @@ -56,7 +56,7 @@ if view.showAds() else span(data-i18n="play_level.skip") - #how-to-play-game-dev-panel.panel.panel-default.hide + #how-to-play-game-dev-panel.panel.panel-default.hide.style-flat .panel-heading h3.panel-title How to play: .panel-body diff --git a/app/views/play/level/PlayLevelView.coffee b/app/views/play/level/PlayLevelView.coffee index 733e4c059..f8ad85119 100644 --- a/app/views/play/level/PlayLevelView.coffee +++ b/app/views/play/level/PlayLevelView.coffee @@ -635,7 +635,22 @@ module.exports = class PlayLevelView extends RootView # Real-time playback onRealTimePlaybackStarted: (e) -> @$el.addClass('real-time').focus() - @$('#how-to-play-game-dev-panel').removeClass('hide') if @level.isType('game-dev') + if @level.isType('game-dev') + panel = @$('#how-to-play-game-dev-panel') + panel.removeClass('hide') + lines = switch @level.get('slug') + when 'over-the-garden-wall' then ['Watch to see if the peasants are properly protected.'] + when 'click-gait' then ['Move to each red "X".', 'Click on the screen to move the Knight there.'] + when 'heros-journey' then ['Move to each red "X".', 'Click on the screen to move the Knight there.'] + when 'a-maze-ing' then ['Move to the chest of gems.', 'Click on the screen to move the Duelist there.'] + when 'gemtacular' then ['Move to each of the gems.', 'Click on the screen to move the Captain there.'] + when 'vorpal-mouse' then ['Slay the ogres.', 'Click on the screen to move the Guardian there.', 'Click on the munchkins to attack them!'] + when 'crushing-it' then ['Slay the ogres.', 'Click on the screen to move the Goliath there.', 'Click on the munchkins to attack them!'] + when 'tabula-rasa' then ['Slay any ogres.', 'Collect any coins.', 'Click on the screen to move the Raider there.', 'Click on any munchkins to attack them!'] + else ['Click to control your hero and win your game!'] + html = _.map(lines, (line) -> "

#{line}

").join('') + panel.find('.panel-body').html(html) + @onWindowResize() onRealTimePlaybackEnded: (e) ->