2014-11-28 20:49:41 -05:00
|
|
|
ModalView = require 'views/core/ModalView'
|
2014-05-19 13:08:12 -04:00
|
|
|
template = require 'templates/play/level/modal/keyboard_shortcuts'
|
|
|
|
|
2014-07-17 20:22:26 -04:00
|
|
|
module.exports = class KeyboardShortcutsModal extends ModalView
|
2014-05-19 13:08:12 -04:00
|
|
|
id: 'keyboard-shortcuts-modal'
|
|
|
|
template: template
|
|
|
|
|
2014-10-06 16:38:42 -04:00
|
|
|
isMac: -> false
|
|
|
|
|
2014-05-19 13:08:12 -04:00
|
|
|
getRenderData: ->
|
|
|
|
c = super()
|
|
|
|
c.ctrl = if @isMac() then '⌘' else '^'
|
|
|
|
c.ctrlName = if @isMac() then 'Cmd' else 'Ctrl'
|
2014-10-06 16:38:42 -04:00
|
|
|
c.alt = if @isMac() then '⌥' else '⎇'
|
2014-05-19 13:08:12 -04:00
|
|
|
c.altName = if @isMac() then 'Opt' else 'Alt'
|
|
|
|
c.enter = $.i18n.t 'keyboard_shortcuts.enter'
|
|
|
|
c.space = $.i18n.t 'keyboard_shortcuts.space'
|
|
|
|
c.escapeKey = $.i18n.t 'keyboard_shortcuts.escape'
|
2014-08-27 20:26:56 -04:00
|
|
|
c.shift = $.i18n.t 'keyboard_shortcuts.shift'
|
2014-05-19 13:08:12 -04:00
|
|
|
c
|