Fixed a couple issues with DOM highlight pointer; removed the noise for now. Minor tweaks to the world map view; hiding the items for non-admins for now.

This commit is contained in:
Nick Winter 2014-09-18 18:25:33 -07:00
parent 791c23c7e7
commit 121ff0a4af
4 changed files with 11 additions and 4 deletions

View file

@ -122,6 +122,7 @@ $gameControlMargin: 40px
position: absolute
right: 1%
bottom: 1%
z-index: 3
button.btn
&:not(:first-child)
@ -131,7 +132,7 @@ $gameControlMargin: 40px
background: url(/images/pages/play/menu_icons.png) no-repeat
background-size: cover
@include transition(0.5s ease)
box-shadow: 0 0 0 #bbf
box-shadow: 2px 2px 4px black
border: 0
border-radius: 12px

View file

@ -27,7 +27,8 @@
.campaign-label(style="color: #{campaign.color}")= campaign.name
.game-controls
button.btn.items(data-toggle='coco-modal', data-target='play/modal/PlayItemsModal', data-i18n="[title]play.items")
if me.isAdmin()
button.btn.items(data-toggle='coco-modal', data-target='play/modal/PlayItemsModal', data-i18n="[title]play.items")
button.btn.heroes(data-toggle='coco-modal', data-target='play/modal/PlayHeroesModal', data-i18n="[title]play.heroes")
button.btn.achievements(data-toggle='coco-modal', data-target='play/modal/PlayAchievementsModal', data-i18n="[title]play.achievements")
button.btn.account(data-toggle='coco-modal', data-target='play/modal/PlayAccountModal', data-i18n="[title]play.account")

View file

@ -12,7 +12,7 @@ class LevelSessionsCollection extends CocoCollection
super()
@url = "/db/user/#{me.id}/level.sessions?project=state.complete,levelID"
module.exports = class MainPlayView extends RootView
module.exports = class WorldMapView extends RootView
id: 'world-map-view'
template: template
@ -32,6 +32,10 @@ module.exports = class MainPlayView extends RootView
@getLevelPlayCounts()
$(window).on 'resize', @onWindowResize
destroy: ->
$(window).off 'resize', @onWindowResize
super()
getLevelPlayCounts: ->
success = (levelPlayCounts) =>
return if @destroyed

View file

@ -383,6 +383,7 @@ module.exports = class PlayLevelView extends RootView
onWindowResize: (s...) ->
$('#pointer').css('opacity', 0.0)
clearInterval(@pointerInterval)
onDisableControls: (e) ->
return if e.controls and not ('level' in e.controls)
@ -505,7 +506,7 @@ module.exports = class PlayLevelView extends RootView
pointer = $('#pointer')
pointer.css('transition', 'all 0.6s ease-out')
pointer.css('transform', "rotate(#{@pointerRotation}rad) translate(-3px, #{@pointerRadialDistance-50}px)")
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'dom_highlight', volume: 0.75
#Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'dom_highlight', volume: 0.75 # Never mind, this is currently so annoying
setTimeout((=>
pointer.css('transform', "rotate(#{@pointerRotation}rad) translate(-3px, #{@pointerRadialDistance}px)").css('transition', 'all 0.4s ease-in')), 800)