Change crafting table name to show step count

This commit is contained in:
Andrew Miner
2015-01-10 10:52:23 -08:00
parent f21e1592c0
commit cbe836086a
2 changed files with 11 additions and 0 deletions
@@ -42,7 +42,10 @@ module.exports = class CraftingTableController extends BaseController
@$outputLink = @$('.output a')
@$outputQuantity = @$('.quantity')
@$prev = @$('.prev')
@$title = @$('h2 p')
@$tool = @$('.tool p')
@defaultTitle = @$title.html()
super
refresh: ->
@@ -52,6 +55,9 @@ module.exports = class CraftingTableController extends BaseController
if @model.hasSteps
if @model.hasPrevStep then @$prev.addClass 'enabled'
if @model.hasNextStep then @$next.addClass 'enabled'
@$title.html "Step #{@model.step + 1} of #{@model.stepCount}"
else
@$title.html @defaultTitle
@$tool.html @model.toolNames