mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
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:
parent
791c23c7e7
commit
121ff0a4af
4 changed files with 11 additions and 4 deletions
|
@ -122,6 +122,7 @@ $gameControlMargin: 40px
|
||||||
position: absolute
|
position: absolute
|
||||||
right: 1%
|
right: 1%
|
||||||
bottom: 1%
|
bottom: 1%
|
||||||
|
z-index: 3
|
||||||
|
|
||||||
button.btn
|
button.btn
|
||||||
&:not(:first-child)
|
&:not(:first-child)
|
||||||
|
@ -131,7 +132,7 @@ $gameControlMargin: 40px
|
||||||
background: url(/images/pages/play/menu_icons.png) no-repeat
|
background: url(/images/pages/play/menu_icons.png) no-repeat
|
||||||
background-size: cover
|
background-size: cover
|
||||||
@include transition(0.5s ease)
|
@include transition(0.5s ease)
|
||||||
box-shadow: 0 0 0 #bbf
|
box-shadow: 2px 2px 4px black
|
||||||
border: 0
|
border: 0
|
||||||
border-radius: 12px
|
border-radius: 12px
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
.campaign-label(style="color: #{campaign.color}")= campaign.name
|
.campaign-label(style="color: #{campaign.color}")= campaign.name
|
||||||
|
|
||||||
.game-controls
|
.game-controls
|
||||||
|
if me.isAdmin()
|
||||||
button.btn.items(data-toggle='coco-modal', data-target='play/modal/PlayItemsModal', data-i18n="[title]play.items")
|
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.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.achievements(data-toggle='coco-modal', data-target='play/modal/PlayAchievementsModal', data-i18n="[title]play.achievements")
|
||||||
|
|
|
@ -12,7 +12,7 @@ class LevelSessionsCollection extends CocoCollection
|
||||||
super()
|
super()
|
||||||
@url = "/db/user/#{me.id}/level.sessions?project=state.complete,levelID"
|
@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'
|
id: 'world-map-view'
|
||||||
template: template
|
template: template
|
||||||
|
|
||||||
|
@ -32,6 +32,10 @@ module.exports = class MainPlayView extends RootView
|
||||||
@getLevelPlayCounts()
|
@getLevelPlayCounts()
|
||||||
$(window).on 'resize', @onWindowResize
|
$(window).on 'resize', @onWindowResize
|
||||||
|
|
||||||
|
destroy: ->
|
||||||
|
$(window).off 'resize', @onWindowResize
|
||||||
|
super()
|
||||||
|
|
||||||
getLevelPlayCounts: ->
|
getLevelPlayCounts: ->
|
||||||
success = (levelPlayCounts) =>
|
success = (levelPlayCounts) =>
|
||||||
return if @destroyed
|
return if @destroyed
|
||||||
|
|
|
@ -383,6 +383,7 @@ module.exports = class PlayLevelView extends RootView
|
||||||
|
|
||||||
onWindowResize: (s...) ->
|
onWindowResize: (s...) ->
|
||||||
$('#pointer').css('opacity', 0.0)
|
$('#pointer').css('opacity', 0.0)
|
||||||
|
clearInterval(@pointerInterval)
|
||||||
|
|
||||||
onDisableControls: (e) ->
|
onDisableControls: (e) ->
|
||||||
return if e.controls and not ('level' in e.controls)
|
return if e.controls and not ('level' in e.controls)
|
||||||
|
@ -505,7 +506,7 @@ module.exports = class PlayLevelView extends RootView
|
||||||
pointer = $('#pointer')
|
pointer = $('#pointer')
|
||||||
pointer.css('transition', 'all 0.6s ease-out')
|
pointer.css('transition', 'all 0.6s ease-out')
|
||||||
pointer.css('transform', "rotate(#{@pointerRotation}rad) translate(-3px, #{@pointerRadialDistance-50}px)")
|
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((=>
|
setTimeout((=>
|
||||||
pointer.css('transform', "rotate(#{@pointerRotation}rad) translate(-3px, #{@pointerRadialDistance}px)").css('transition', 'all 0.4s ease-in')), 800)
|
pointer.css('transform', "rotate(#{@pointerRotation}rad) translate(-3px, #{@pointerRadialDistance}px)").css('transition', 'all 0.4s ease-in')), 800)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue