diff --git a/app/assets/images/pages/play/play-spritesheet.png b/app/assets/images/pages/play/play-spritesheet.png new file mode 100644 index 000000000..f38e523e7 Binary files /dev/null and b/app/assets/images/pages/play/play-spritesheet.png differ diff --git a/app/core/initialize.coffee b/app/core/initialize.coffee index 159fe627b..a3033feac 100644 --- a/app/core/initialize.coffee +++ b/app/core/initialize.coffee @@ -77,6 +77,13 @@ initializeUtilityServices = -> require('core/services/segmentio')() setupConsoleLogging = -> + # IE9 doesn't expose console object unless debugger tools are loaded + unless console? + window.console = + info: -> + log: -> + error: -> + debug: -> unless console.debug # Needed for IE10 and earlier console.debug = console.log diff --git a/app/models/CocoModel.coffee b/app/models/CocoModel.coffee index 1d7c7439d..e0e1be276 100644 --- a/app/models/CocoModel.coffee +++ b/app/models/CocoModel.coffee @@ -19,6 +19,13 @@ class CocoModel extends Backbone.Model @on 'error', @onError, @ @on 'add', @onLoaded, @ @saveBackup = _.debounce(@saveBackup, 500) + # IE9 doesn't expose console object unless debugger tools are loaded + unless console? + window.console = + info: -> + log: -> + error: -> + debug: -> console.debug = console.log unless console.debug # Needed for IE10 and earlier setProjection: (project) -> diff --git a/app/styles/achievements.sass b/app/styles/achievements.sass index 396472b6a..f39b6c968 100644 --- a/app/styles/achievements.sass +++ b/app/styles/achievements.sass @@ -95,7 +95,7 @@ $user-achievements-scale: 0.8 padding: $overall-scale * 24px $overall-scale * 30px $overall-scale * 20px $overall-scale * 60px .achievement-title - font-family: Open Sans Condensed + font-family: $headings-font-family font-variant: small-caps font-size: $overall-scale * 28px padding-left: $overall-scale * -50px diff --git a/app/styles/bootstrap/_variables.scss b/app/styles/bootstrap/_variables.scss index e2b5af123..06930f639 100644 --- a/app/styles/bootstrap/_variables.scss +++ b/app/styles/bootstrap/_variables.scss @@ -75,7 +75,7 @@ $font-size-h6: ceil($font-size-base * 0.85) !default; // ~12px $line-height-base: 1.428571429 !default; // 20/14 $line-height-computed: floor($font-size-base * $line-height-base) !default; // ~20px -$headings-font-family: 'Open Sans Condensed', cursive; // empty to use BS default, $baseFontFamily; +$headings-font-family: 'Open Sans Condensed', "Helvetica Neue", Helvetica, Arial, sans-serif; // empty to use BS default, $baseFontFamily; $headings-font-weight: 700 !default; $headings-line-height: 1.1 !default; $headings-color: #317EAC; diff --git a/app/styles/common/common.sass b/app/styles/common/common.sass index 0cb17cf71..5a17efca4 100644 --- a/app/styles/common/common.sass +++ b/app/styles/common/common.sass @@ -140,12 +140,12 @@ table.table body[lang='ja'] h1, h2, h3, h4, h5, h6 - font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", 'Open Sans Condensed', sans-serif + font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", 'Open Sans Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif font-variant: small-caps letter-spacing: -1px !important .header-font - font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", 'Open Sans Condensed', sans-serif + font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", 'Open Sans Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif font-variant: small-caps letter-spacing: -1px !important @@ -216,6 +216,10 @@ kbd width: 25px height: 25px + &.gem-30 + width: 30px + height: 30px + &.gem-40 width: 40px height: 40px @@ -225,6 +229,7 @@ kbd height: 60px .popover + border-style: solid border-image: url(/images/level/popover_background.png) 29 39 fill stretch border-width: 15px 20px .arrow @@ -238,16 +243,19 @@ kbd border: 0 border-radius: 0 @include box-shadow(none) + border-style: solid border-image: url(/images/common/button-background-active-border.png) 14 20 20 20 fill round border-width: 7px 10px 10px 10px padding: 0 - font-family: Open Sans Condensed + font-family: $headings-font-family text-transform: uppercase font-weight: bold color: rgb(248, 197, 146) &.btn-lg border-width: 14px 20px 20px 20px + height: 60px + line-height: 34px &.btn-primary border-image-source: url(/images/common/button-background-primary-active-border.png) diff --git a/app/styles/common/site-chrome.sass b/app/styles/common/site-chrome.sass index dd4926a4e..c9b3c5349 100644 --- a/app/styles/common/site-chrome.sass +++ b/app/styles/common/site-chrome.sass @@ -68,7 +68,7 @@ & > a, button, select font-size: 18px text-transform: uppercase - font-family: Open Sans Condensed + font-family: $headings-font-family margin: 0 7px button, select diff --git a/app/styles/game-menu/game-menu-modal.sass b/app/styles/game-menu/game-menu-modal.sass index 2707d39b0..a9390ea01 100644 --- a/app/styles/game-menu/game-menu-modal.sass +++ b/app/styles/game-menu/game-menu-modal.sass @@ -1,3 +1,4 @@ +@import "app/styles/bootstrap/variables" @import "app/styles/mixins" #game-menu-modal @@ -67,7 +68,7 @@ color: rgb(195,153,124) font-weight: bold padding: 14px 20px - font-family: Open Sans Condensed + font-family: $headings-font-family text-transform: uppercase .glyphicon diff --git a/app/styles/modal/auth-modal.sass b/app/styles/modal/auth-modal.sass index ca0d263af..f87d478f3 100644 --- a/app/styles/modal/auth-modal.sass +++ b/app/styles/modal/auth-modal.sass @@ -92,7 +92,7 @@ label font-size: 20px text-transform: uppercase - font-family: 'Open Sans Condensed' + font-family: $headings-font-family margin-bottom: 0 //- Check boxes @@ -146,6 +146,7 @@ height: 70px font-size: 32px line-height: 42px + border-style: solid border-image: url(/images/level/code_toolbar_submit_button_active.png) 14 20 20 20 fill round border-width: 14px 20px 20px 20px color: white @@ -235,7 +236,7 @@ width: 200px color: rgb(254,188,68) font-size: 20px - font-family: 'Open Sans Condensed' + font-family: $headings-font-family font-weight: bold text-transform: uppercase text-shadow: black 1px 1px 0, black -1px -1px 0, black 1px -1px 0, black -1px 1px 0, black 1px 0px 0, black 0px -1px 0, black -1px 0px 0, black 0px 1px 0 diff --git a/app/styles/play/ladder_home.sass b/app/styles/play/ladder_home.sass index e9406ef18..e9b474a6a 100644 --- a/app/styles/play/ladder_home.sass +++ b/app/styles/play/ladder_home.sass @@ -21,7 +21,7 @@ .overlay-text color: $yellow - font-family: Open Sans Condensed + font-family: $headings-font-family font-variant: small-caps @include transition(color .10s linear) diff --git a/app/styles/play/level.sass b/app/styles/play/level.sass index c54f94ad5..f0a44d523 100644 --- a/app/styles/play/level.sass +++ b/app/styles/play/level.sass @@ -187,7 +187,7 @@ $level-resize-transition-time: 0.5s #play-footer text-align: center - font-family: "Open Sans Condensed" + font-family: $headings-font-family font-variant: small-caps font-size: 25px padding: 10px 0 diff --git a/app/styles/play/level/control_bar.sass b/app/styles/play/level/control_bar.sass index b95ef88f5..1c036f936 100644 --- a/app/styles/play/level/control_bar.sass +++ b/app/styles/play/level/control_bar.sass @@ -12,7 +12,7 @@ position: absolute z-index: 6 text-transform: uppercase - font-family: Open Sans Condensed + font-family: $headings-font-family font-weight: bold &.controls-disabled @@ -100,6 +100,7 @@ height: 60px margin: 0 auto padding: 8px + border-style: solid border-image: url(/images/level/control_bar_level_name_background.png) 30 fill round border-width: 0 15px 15px 15px text-align: center @@ -128,6 +129,7 @@ height: 60px margin: 0 auto padding: 8px + border-style: solid border-image: url(/images/level/control_bar_level_name_background.png) 30 fill round border-width: 0 15px 15px 15px text-align: center diff --git a/app/styles/play/level/goals.sass b/app/styles/play/level/goals.sass index 1d8e4a06f..09e46f2f3 100644 --- a/app/styles/play/level/goals.sass +++ b/app/styles/play/level/goals.sass @@ -6,6 +6,7 @@ left: -15px top: -100px @include transition(0.5s ease-in-out) + border-style: solid border-image: url(/images/level/goals_background.png) 15 20 51 15 fill stretch border-width: 8px 10px 25px 8px margin: -8px -10px -25px -8px diff --git a/app/styles/play/level/hud.sass b/app/styles/play/level/hud.sass index be3502933..eb124d8aa 100644 --- a/app/styles/play/level/hud.sass +++ b/app/styles/play/level/hud.sass @@ -98,7 +98,7 @@ background-image: url(/images/level/hud_background.png) color: white text-transform: uppercase - font-family: Open Sans Condensed + font-family: $headings-font-family font-weight: bold font-size: 16px z-index: 4 diff --git a/app/styles/play/level/modal/hero-victory-modal.sass b/app/styles/play/level/modal/hero-victory-modal.sass index 6344b42cb..c881afa9f 100644 --- a/app/styles/play/level/modal/hero-victory-modal.sass +++ b/app/styles/play/level/modal/hero-victory-modal.sass @@ -33,6 +33,7 @@ width: 750px background: transparent border: 0px solid transparent + border-style: solid border-image: url("/images/pages/play/level/modal/victory_modal_border_background.png") 250 0 100 0 fill round border-width: 250px 0 100px 0 border-radius: 12px @@ -114,7 +115,7 @@ color: $hero-yellow-text font-weight: bold text-transform: uppercase - font-family: 'Open Sans Condensed' + font-family: $headings-font-family white-space: nowrap overflow: hidden text-overflow: ellipsis @@ -258,7 +259,7 @@ color: rgb(103, 92, 76) text-transform: uppercase font-weight: bold - font-family: 'Open Sans Condensed' + font-family: $headings-font-family font-size: 18px margin-top: 13px line-height: 18px @@ -302,7 +303,7 @@ .sign-up-blurb width: 175px - font-family: 'Open Sans Condensed' + font-family: $headings-font-family font-weight: bold text-transform: uppercase font-size: 18px diff --git a/app/styles/play/level/modal/victory.sass b/app/styles/play/level/modal/victory.sass index 9a343b3ce..c89731517 100644 --- a/app/styles/play/level/modal/victory.sass +++ b/app/styles/play/level/modal/victory.sass @@ -1,3 +1,6 @@ +@import "app/styles/mixins" +@import "app/styles/bootstrap/variables" + #level-victory-modal .victory-banner float: right @@ -55,4 +58,4 @@ body.ipad #level-victory-modal .modal-body font-size: 30px - font-family: Open Sans Condensed + font-family: $headings-font-family diff --git a/app/styles/play/level/tome/cast_button.sass b/app/styles/play/level/tome/cast_button.sass index 4f442e660..3a8a8c45c 100644 --- a/app/styles/play/level/tome/cast_button.sass +++ b/app/styles/play/level/tome/cast_button.sass @@ -46,6 +46,7 @@ width: 45% width: -webkit-calc(50% - 10px) width: calc(50% - 10px) + border-style: solid border-image: url(/images/level/code_toolbar_run_button_active.png) 14 20 20 20 fill round border-width: 7px 10px 10px 10px diff --git a/app/styles/play/level/tome/problem_alert.sass b/app/styles/play/level/tome/problem_alert.sass index aaba3a19d..5c2f2027c 100644 --- a/app/styles/play/level/tome/problem_alert.sass +++ b/app/styles/play/level/tome/problem_alert.sass @@ -15,6 +15,7 @@ text-shadow: none color: white word-wrap: break-word + border-style: solid border-image: url(/images/level/code_editor_error_background.png) 16 20 fill round border-width: 16px 20px diff --git a/app/styles/play/level/tome/spell_debug.sass b/app/styles/play/level/tome/spell_debug.sass index 58d8b5f71..945b01d8f 100644 --- a/app/styles/play/level/tome/spell_debug.sass +++ b/app/styles/play/level/tome/spell_debug.sass @@ -7,6 +7,7 @@ min-width: 250px max-width: 400px padding: 10px + border-style: solid border-image: url(/images/level/popover_background.png) 18 fill round border-width: 8px .progress diff --git a/app/styles/play/level/tome/spell_list.sass b/app/styles/play/level/tome/spell_list.sass index e988bfce0..7a234a402 100644 --- a/app/styles/play/level/tome/spell_list.sass +++ b/app/styles/play/level/tome/spell_list.sass @@ -9,6 +9,7 @@ left: 0% right: 10% padding: 4% + border-style: solid border-image: url(/images/level/popover_background.png) 18 fill round border-width: 15px diff --git a/app/styles/play/level/tome/spell_list_entry.sass b/app/styles/play/level/tome/spell_list_entry.sass index 60f700c31..9599039cb 100644 --- a/app/styles/play/level/tome/spell_list_entry.sass +++ b/app/styles/play/level/tome/spell_list_entry.sass @@ -93,7 +93,7 @@ margin-top: 10px text-transform: uppercase display: inline-block - font-family: Open Sans Condensed + font-family: $headings-font-family font-weight: bold .method-label diff --git a/app/styles/play/level/tome/spell_list_entry_thangs.sass b/app/styles/play/level/tome/spell_list_entry_thangs.sass index 5f8a275f7..b8faebba0 100644 --- a/app/styles/play/level/tome/spell_list_entry_thangs.sass +++ b/app/styles/play/level/tome/spell_list_entry_thangs.sass @@ -11,6 +11,7 @@ max-height: 500px overflow: scroll padding: 4% + border-style: solid border-image: url(/images/level/popover_background.png) 18 fill round border-width: 15px diff --git a/app/styles/play/level/tome/spell_palette_entry.sass b/app/styles/play/level/tome/spell_palette_entry.sass index 7ddba6bb9..bb0177039 100644 --- a/app/styles/play/level/tome/spell_palette_entry.sass +++ b/app/styles/play/level/tome/spell_palette_entry.sass @@ -55,6 +55,7 @@ body:not(.dialogue-view-active) // Only those popovers which are our direct children (spell documentation) max-width: 600px padding: 0 + border-style: solid border-image: url(/images/level/popover_background.png) 29 39 fill stretch border-width: 15px 20px @include box-shadow(0 0 0 #000) diff --git a/app/styles/play/level/tome/spell_toolbar.sass b/app/styles/play/level/tome/spell_toolbar.sass index a29c2a137..a17f84769 100644 --- a/app/styles/play/level/tome/spell_toolbar.sass +++ b/app/styles/play/level/tome/spell_toolbar.sass @@ -82,6 +82,7 @@ position: absolute z-index: 10 pointer-events: none + border-style: solid border-image: url(/images/level/popover_background.png) 29 39 fill stretch padding: 0 border-width: 15px 20px diff --git a/app/styles/play/level/tome/tome.sass b/app/styles/play/level/tome/tome.sass index 511a3fa14..ff6f691d0 100644 --- a/app/styles/play/level/tome/tome.sass +++ b/app/styles/play/level/tome/tome.sass @@ -37,6 +37,7 @@ .popover padding: 10px 10px 30px 10px + border-style: solid border-image: url(/images/level/popover_background.png) 18 fill round border-width: 15px @include box-shadow(0 0 0 #000) diff --git a/app/styles/play/modal/item-details-view.sass b/app/styles/play/modal/item-details-view.sass index 0741b68d8..9b7b17918 100644 --- a/app/styles/play/modal/item-details-view.sass +++ b/app/styles/play/modal/item-details-view.sass @@ -1,10 +1,11 @@ +@import "app/styles/bootstrap/variables" @import "app/styles/mixins" #item-details-view .big-font text-transform: uppercase - font-family: "Open Sans Condensed" + font-family: $headings-font-family font-weight: bold .one-line diff --git a/app/styles/play/modal/play-heroes-modal.sass b/app/styles/play/modal/play-heroes-modal.sass index 7d73a2858..4aa7d6c0c 100644 --- a/app/styles/play/modal/play-heroes-modal.sass +++ b/app/styles/play/modal/play-heroes-modal.sass @@ -44,7 +44,7 @@ $heroCanvasHeight: 265px top: 470px #gems-count - font-family: 'Open Sans Condensed' + font-family: $headings-font-family font-size: 24.5px color: lighten(rgb(1,64,91), 50%) @@ -302,7 +302,7 @@ $heroCanvasHeight: 265px text-align: center text-transform: uppercase font-size: 24.5px - font-family: Open Sans Condensed + font-family: $headings-font-family color: white #purchase-hero-button @@ -406,7 +406,7 @@ $heroCanvasHeight: 265px text-align: center text-transform: uppercase font-size: 26px - font-family: Open Sans Condensed + font-family: $headings-font-family color: white diff --git a/app/styles/play/modal/play-items-modal.sass b/app/styles/play/modal/play-items-modal.sass index d0db31efb..24862eb9e 100644 --- a/app/styles/play/modal/play-items-modal.sass +++ b/app/styles/play/modal/play-items-modal.sass @@ -1,10 +1,11 @@ +@import "app/styles/bootstrap/variables" @import "app/styles/mixins" #play-items-modal .big-font text-transform: uppercase - font-family: "Open Sans Condensed" + font-family: $headings-font-family font-weight: bold .one-line @@ -287,7 +288,7 @@ top: 70px font-size: 20px line-height: 20px - font-family: Open Sans Condensed + font-family: $headings-font-family text-transform: uppercase font-weight: bold z-index: 2 diff --git a/app/styles/play/modal/subscribe-modal.sass b/app/styles/play/modal/subscribe-modal.sass index fb1972e83..6d7a87f6e 100644 --- a/app/styles/play/modal/subscribe-modal.sass +++ b/app/styles/play/modal/subscribe-modal.sass @@ -63,7 +63,7 @@ font-weight: bold line-height: 18px color: black - font-family: 'Open Sans Condensed' + font-family: $headings-font-family font-size: 18px .point @@ -100,6 +100,7 @@ top: 430px font-size: 32px line-height: 42px + border-style: solid border-image: url(/images/level/code_toolbar_submit_button_active.png) 14 20 20 20 fill round border-width: 14px 20px 20px 20px color: darken(white, 5%) diff --git a/app/styles/play/world-map-view.sass b/app/styles/play/world-map-view.sass index d82f6a3ad..64a8eec6b 100644 --- a/app/styles/play/world-map-view.sass +++ b/app/styles/play/world-map-view.sass @@ -218,6 +218,7 @@ $gameControlMargin: 30px border-width: 15px // Using modernizr-mixin for compat detection @include yep(borderimage) + border-style: solid border-image: url(/images/level/popover_background.png) 18 fill round @include nope(borderimage) background-color: rgb(247, 242, 218) @@ -318,17 +319,74 @@ $gameControlMargin: 30px .tooltip font-size: 24px + .tooltip-arrow + display: none + .user-status position: absolute - bottom: 1% - left: 1% + bottom: 16px + left: 8px text-align: center font-size: 24px color: white - text-shadow: 1px 1px 0px black + text-shadow: 0px 2px 1px black, 0px -2px 1px black, -2px 0px 1px black, 2px 0px 1px black + height: 32px + line-height: 32px - button - margin-left: 10px + .user-status-line + position: relative + + button.btn.btn-illustrated + margin-left: 10px + min-width: 90px + height: 32px + color: white + + .gem, .player-level-icon, .player-hero-icon + position: absolute + top: 1px + + #gems-count + margin-left: 40px + + .player-level + margin-left: 34px + + .player-name + margin-left: 45px + + $spriteSheetSize: 30px + + .player-level-icon, .player-hero-icon + background: transparent url(/images/pages/play/play-spritesheet.png) + background-size: cover + background-position: (-2 * $spriteSheetSize) 0 + display: inline-block + width: 30px + height: 30px + margin: 0px 2px + + .player-hero-icon + margin-left: 10px + background-position: (-4 * $spriteSheetSize) 0 + + &.knight + background-position: (-5 * $spriteSheetSize) 0 + &.librarian + background-position: (-6 * $spriteSheetSize) 0 + &.ninja + background-position: (-7 * $spriteSheetSize) 0 + &.potion-master + background-position: (-8 * $spriteSheetSize) 0 + &.samurai + background-position: (-9 * $spriteSheetSize) 0 + &.trapper + background-position: (-10 * $spriteSheetSize) 0 + &.forest-archer + background-position: (-11 * $spriteSheetSize) 0 + &.sorcerer + background-position: (-12 * $spriteSheetSize) 0 + #volume-button position: absolute diff --git a/app/templates/play/world-map-view.jade b/app/templates/play/world-map-view.jade index 6db3d5818..142631816 100644 --- a/app/templates/play/world-map-view.jade +++ b/app/templates/play/world-map-view.jade @@ -63,16 +63,19 @@ // a.btn.settings(href='/account', data-i18n="[title]play.settings") .user-status.header-font - span.gem.gem-20 - span#gems-count.spr= me.gems() - span.spl.spr(data-i18n="general.player_level") - span.spr= me.level() - if me.get('anonymous') - span.spr(data-i18n="play.anonymous") Anonymous Player - button.btn.btn-default.btn-flat.btn-sm(data-toggle='coco-modal', data-target='core/AuthModal', data-i18n="login.log_in") - else - span.spr= me.get('name') - button#logout-button.btn.btn-default.btn-flat.btn-sm(data-i18n="login.log_out") Log Out + .user-status-line + span.gem.gem-30 + span#gems-count.spr= me.gems() + span.player-level-icon + span.player-level.spr= me.level() + span.player-hero-icon + if me.get('anonymous') + span.player-name.spr(data-i18n="play.anonymous") Anonymous Player + button.btn.btn-illustrated.login-button.btn-warning(data-i18n="login.log_in") + button.btn.btn-illustrated.signup-button.btn-danger(data-i18n="signup.sign_up") + else + span.player-name.spr= me.get('name') + button#logout-button.btn.btn-default.btn-flat.btn-sm(data-i18n="login.log_out") Log Out button.btn.btn-lg.btn-inverse#volume-button(title="Adjust volume") .glyphicon.glyphicon-volume-off diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 0fb1199a1..024064e1e 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -74,6 +74,7 @@ module.exports = class WorldMapView extends RootView @hadEverChosenHero = me.get('heroConfig')?.thangType @listenTo me, 'change:purchased', -> @renderSelectors('#gems-count') @listenTo me, 'change:spent', -> @renderSelectors('#gems-count') + @listenTo me, 'change:heroConfig', -> @updateHero() window.tracker?.trackEvent 'Loaded World Map', category: 'World Map', ['Google Analytics'] # If it's a new player who didn't appear to come from Hour of Code, we register her here without setting the hourOfCode property. @@ -141,8 +142,10 @@ module.exports = class WorldMapView extends RootView level.color = 'rgb(80, 130, 200)' level.hidden = level.locked or level.disabled - # put lower levels in last, so in the world map they layer over one another properly. - context.campaign.levels = (_.sortBy context.campaign.levels, 'y').reverse() + ## put lower levels in last, so in the world map they layer over one another properly. + #context.campaign.levels = (_.sortBy context.campaign.levels, 'y').reverse() + # Actually, there's some logic that depends on the order of iteration of levels to determine + # which one to do next when you're coming here not from a level; can we do this another way? context.levelStatusMap = @levelStatusMap context.levelPlayCountMap = @levelPlayCountMap @@ -167,6 +170,7 @@ module.exports = class WorldMapView extends RootView console.log "#{$(@).data('level-id')}\n x: #{(100 * x).toFixed(2)}\n y: #{(100 * y).toFixed(2)}\n" @$el.addClass _.string.slugify @terrain @updateVolume() + @updateHero() unless window.currentModal or not @fullyRendered @highlightElement '.level.next', delay: 500, duration: 60000, rotation: 0, sides: ['top'] if levelID = @$el.find('.level.next').data('level-id') @@ -345,6 +349,12 @@ module.exports = class WorldMapView extends RootView newI = 2 @updateVolume volumes[newI] + updateHero: -> + return unless hero = me.get('heroConfig')?.thangType + for slug, original of ThangType.heroes when original is hero + @$el.find('.player-hero-icon').removeClass().addClass('player-hero-icon ' + slug) + return + console.error "WorldMapView hero update couldn't find hero slug for original:", hero dungeon = [ { diff --git a/app/views/play/modal/PlayItemsModal.coffee b/app/views/play/modal/PlayItemsModal.coffee index ace78bf22..4a4ae7c04 100644 --- a/app/views/play/modal/PlayItemsModal.coffee +++ b/app/views/play/modal/PlayItemsModal.coffee @@ -202,6 +202,7 @@ module.exports = class PlayItemsModal extends ModalView unlockButton.popover( animation: true trigger: 'manual' + placement: 'top' content: ' ' # template has it container: @$el template: popoverTemplate