mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Added a back button to hit campaign selector view.
This commit is contained in:
parent
097dbd11dd
commit
3cbf11d404
3 changed files with 27 additions and 3 deletions
|
@ -448,6 +448,21 @@ $gameControlMargin: 30px
|
|||
&.vol-down .glyphicon.glyphicon-volume-down
|
||||
display: inline-block
|
||||
|
||||
#back-button
|
||||
position: absolute
|
||||
left: 70px
|
||||
left: -webkit-calc(1% + 55px)
|
||||
left: calc(1% + 55px)
|
||||
top: 1%
|
||||
padding: 3px 8px
|
||||
@include opacity(0.75)
|
||||
|
||||
&:hover
|
||||
@include opacity(1.0)
|
||||
|
||||
.glyphicon
|
||||
font-size: 32px
|
||||
|
||||
#campaign-status
|
||||
position: absolute
|
||||
left: 0
|
||||
|
@ -539,10 +554,8 @@ $gameControlMargin: 30px
|
|||
|
||||
.campaign-name, .levels-completed, .campaign-locked
|
||||
margin: 0
|
||||
color: rgb(232, 217, 87)
|
||||
color: white
|
||||
text-shadow: black 2px 2px 0, black -2px -2px 0, black 2px -2px 0, black -2px 2px 0, black 2px 0px 0, black 0px -2px 0, black -2px 0px 0, black 0px 2px 0
|
||||
z-index: 30
|
||||
pointer-events: none
|
||||
|
||||
.levels-completed
|
||||
font-size: 22px
|
||||
|
|
|
@ -108,6 +108,10 @@ button.btn.btn-lg.btn-inverse#volume-button(data-i18n="[title]play.adjust_volume
|
|||
.glyphicon.glyphicon-volume-down
|
||||
.glyphicon.glyphicon-volume-up
|
||||
|
||||
if campaign
|
||||
.btn.btn-lg.btn-inverse#back-button(data-i18n="[title]resources.campaigns", title="Campaigns")
|
||||
.glyphicon.glyphicon-globe
|
||||
|
||||
if campaign && campaign.loaded
|
||||
h1#campaign-status
|
||||
.campaign-status-background
|
||||
|
|
|
@ -46,6 +46,7 @@ module.exports = class CampaignView extends RootView
|
|||
'click .level-info-container .start-level': 'onClickStartLevel'
|
||||
'click .level-info-container .view-solutions': 'onClickViewSolutions'
|
||||
'click #volume-button': 'onToggleVolume'
|
||||
'click #back-button': 'onClickBack'
|
||||
'click .portal .campaign': 'onClickPortalCampaign'
|
||||
'mouseenter .portals': 'onMouseEnterPortals'
|
||||
'mouseleave .portals': 'onMouseLeavePortals'
|
||||
|
@ -516,6 +517,12 @@ module.exports = class CampaignView extends RootView
|
|||
newI = 2
|
||||
@updateVolume volumes[newI]
|
||||
|
||||
onClickBack: (e) ->
|
||||
Backbone.Mediator.publish 'router:navigate',
|
||||
route: "/play"
|
||||
viewClass: CampaignView
|
||||
viewArgs: [{supermodel: @supermodel}]
|
||||
|
||||
updateHero: ->
|
||||
return unless hero = me.get('heroConfig')?.thangType
|
||||
for slug, original of ThangType.heroes when original is hero
|
||||
|
|
Loading…
Reference in a new issue