mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Added static imagery to the world map to show better completed, started and premium levels.
This commit is contained in:
parent
0ddc55d1d5
commit
690a24cda9
6 changed files with 34 additions and 0 deletions
BIN
app/assets/images/pages/play/level-banner-complete.png
Normal file
BIN
app/assets/images/pages/play/level-banner-complete.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
BIN
app/assets/images/pages/play/level-banner-started.png
Normal file
BIN
app/assets/images/pages/play/level-banner-started.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5 KiB |
BIN
app/assets/images/pages/play/star.png
Normal file
BIN
app/assets/images/pages/play/star.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -141,6 +141,29 @@ $gameControlMargin: 30px
|
|||
&.complete
|
||||
border: 3px solid gold
|
||||
@include box-shadow(0px 0px 35px skyblue)
|
||||
|
||||
img.banner
|
||||
position: absolute
|
||||
bottom: 38%
|
||||
left: -50%
|
||||
width: 200%
|
||||
pointer-events: none
|
||||
|
||||
img.star
|
||||
width: 100%
|
||||
bottom: 7%
|
||||
position: absolute
|
||||
pointer-events: none
|
||||
|
||||
.glyphicon-star
|
||||
position: absolute
|
||||
color: lightblue
|
||||
font-size: 21px
|
||||
left: 1.5px
|
||||
|
||||
&.started .glyphicon-star
|
||||
left: 0.5px
|
||||
|
||||
|
||||
.level-shadow
|
||||
z-index: 1
|
||||
|
|
|
@ -12,6 +12,12 @@
|
|||
- seenNext = seenNext || next;
|
||||
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{level.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name + (level.disabled ? ' (Coming Soon to Adventurers)' : ''))
|
||||
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
||||
if level.requiresSubscription
|
||||
img.star(src="/images/pages/play/star.png")
|
||||
if levelStatusMap[level.id] === 'complete'
|
||||
img.banner(src="/images/pages/play/level-banner-complete.png")
|
||||
if levelStatusMap[level.id] === 'started'
|
||||
img.banner(src="/images/pages/play/level-banner-started.png")
|
||||
div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "")
|
||||
.level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
||||
div(class="level-info " + (levelStatusMap[level.id] || ""))
|
||||
|
|
|
@ -138,6 +138,11 @@ module.exports = class WorldMapView extends RootView
|
|||
level.color = 'rgb(255, 80, 60)'
|
||||
if level.requiresSubscription
|
||||
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()
|
||||
|
||||
context.levelStatusMap = @levelStatusMap
|
||||
context.levelPlayCountMap = @levelPlayCountMap
|
||||
context.isIPadApp = application.isIPadApp
|
||||
|
|
Loading…
Reference in a new issue