2014-11-28 20:49:41 -05:00
|
|
|
CocoView = require 'views/core/CocoView'
|
2014-08-08 14:36:41 -04:00
|
|
|
template = require 'templates/game-menu/save-load-view'
|
2014-11-28 20:49:41 -05:00
|
|
|
{me} = require 'core/auth'
|
2014-08-08 14:36:41 -04:00
|
|
|
ThangType = require 'models/ThangType'
|
|
|
|
|
|
|
|
module.exports = class SaveLoadView extends CocoView
|
|
|
|
id: 'save-load-view'
|
|
|
|
className: 'tab-pane'
|
|
|
|
template: template
|
|
|
|
|
2014-08-08 18:56:53 -04:00
|
|
|
events:
|
|
|
|
'change #save-granularity-toggle input': 'onSaveGranularityChanged'
|
|
|
|
|
2014-08-08 14:36:41 -04:00
|
|
|
getRenderData: (context={}) ->
|
|
|
|
context = super(context)
|
|
|
|
context
|
|
|
|
|
|
|
|
afterRender: ->
|
|
|
|
super()
|
2014-08-08 18:56:53 -04:00
|
|
|
|
|
|
|
onSaveGranularityChanged: (e) ->
|
2014-11-26 09:58:23 -05:00
|
|
|
@playSound 'menu-button-click'
|
2014-08-08 18:56:53 -04:00
|
|
|
toShow = $(e.target).val()
|
|
|
|
@$el.find('.save-list, .save-pane').hide()
|
|
|
|
@$el.find('.save-list.' + toShow + ', .save-pane.' + toShow).show()
|