Hide HUD until Kithgard Gates.

This commit is contained in:
Nick Winter 2014-10-30 16:59:32 -07:00
parent fa25cd9c32
commit 57680f4a83
3 changed files with 10 additions and 1 deletions

View file

@ -48,6 +48,10 @@
background-image: url(/images/level/hud_right_wing.png)
background-position: left
&.hide-hud-properties .center .thang-props
visibility: hidden
position: absolute
.center
width: 560px
height: 120px

View file

@ -60,7 +60,8 @@ module.exports = class LevelGoalsView extends CocoView
# This should really get refactored, along with GoalManager, so that goals have a standard
# representation of how many are done, how many are needed, what that means, etc.
li = $('<li></li>').addClass("status-#{state.status}").text(text)
li.prepend($('<i></i>').addClass('glyphicon').addClass(iconClass) if iconClass = stateIconMap[state.status])
iconClass = stateIconMap[state.status]
li.prepend($('<i></i>').addClass("glyphicon #{iconClass or ''}")) # If empty, insert a .glyphicon to take up space
list.append(li)
goals.push goal
if not firstRun and state.status is 'success' and @previousGoalStatus[goal.id] isnt 'success'

View file

@ -30,6 +30,9 @@ module.exports = class LevelHUDView extends CocoView
afterRender: ->
super()
@$el.addClass 'no-selection'
if @options.level.get('slug') in ['dungeons-of-kithgard', 'gems-in-the-deep', 'forgetful-gemsmith', 'shadow-guard', 'kounter-kithwise', 'crawlways-of-kithgard', 'true-names', 'favorable-odds', 'the-raised-sword', 'the-first-kithmaze', 'descending-further', 'the-second-kithmaze', 'new-sight', 'known-enemy', 'master-of-names', 'lowly-kithmen', 'closing-the-distance', 'assassinating-more-kithmen???', 'the-final-kithmaze', 'the-gauntlet']
@hidesHUD = true
@$el.addClass 'hide-hud-properties'
onClick: (e) ->
Backbone.Mediator.publish 'tome:focus-editor', {} unless $(e.target).parents('.thang-props').length
@ -264,6 +267,7 @@ module.exports = class LevelHUDView extends CocoView
$('.thang-elem', @$el).removeClass('secret')
$('.dialogue-area', @$el).addClass('secret')
$('.thang-actions', @$el).toggleClass 'secret', not @showingActions
@$el.find('.thang-canvas-wrapper').addClass('secret') if @hidesHUD
update: ->
return unless @thang and not @speaker