mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Merge pull request #119 from rhc2104/remove-esc-prompt
If you have pressed esc, do not get prompted about it
This commit is contained in:
commit
df3e80dd17
1 changed files with 5 additions and 1 deletions
|
@ -22,6 +22,7 @@ module.exports = class HUDView extends View
|
|||
'level-disable-controls': 'onDisableControls'
|
||||
'level-enable-controls': 'onEnableControls'
|
||||
'level:shift-space-pressed': 'onShiftSpacePressed'
|
||||
'level:escape-pressed': 'onEscapePressed'
|
||||
'god:new-world-created': 'onNewWorldCreated'
|
||||
'surface:ticked': 'onTick'
|
||||
'dialogue-sound-completed': 'onDialogueSoundCompleted'
|
||||
|
@ -174,7 +175,7 @@ module.exports = class HUDView extends View
|
|||
response.button = $('button:last', group)
|
||||
else
|
||||
s = $.i18n.t('play_level.hud_continue', defaultValue: "Continue (press shift-space)")
|
||||
if @shiftSpacePressed > 4
|
||||
if @shiftSpacePressed > 4 && !@escapePressed
|
||||
group.append('<span class="hud-hint">Press esc to skip dialog</span>')
|
||||
group.append($('<button class="btn btn-small banner with-dot">' + s + ' <div class="dot"></div></button>'))
|
||||
@lastResponses = null
|
||||
|
@ -206,6 +207,9 @@ module.exports = class HUDView extends View
|
|||
r = @lastResponses[@lastResponses.length - 1]
|
||||
_.delay (-> Backbone.Mediator.publish(r.channel, r.event)), 10
|
||||
|
||||
onEscapePressed: (e) ->
|
||||
@escapePressed = true
|
||||
|
||||
animateEnterButton: =>
|
||||
return unless @bubble
|
||||
button = $('.enter', @bubble)
|
||||
|
|
Loading…
Reference in a new issue