mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-25 20:30:01 -04:00
Implemented George's new level loading view design.
This commit is contained in:
parent
1cada9dd77
commit
35f1ed1e82
5 changed files with 80 additions and 54 deletions
BIN
app/assets/images/level/loading_bar_fill.png
Normal file
BIN
app/assets/images/level/loading_bar_fill.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6 KiB |
BIN
app/assets/images/level/loading_bar_rim.png
Normal file
BIN
app/assets/images/level/loading_bar_rim.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
|
@ -9,7 +9,6 @@
|
||||||
background-size: contain
|
background-size: contain
|
||||||
|
|
||||||
#level-loading-view
|
#level-loading-view
|
||||||
color: blue
|
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 100%
|
height: 100%
|
||||||
position: absolute
|
position: absolute
|
||||||
|
@ -21,61 +20,86 @@
|
||||||
|
|
||||||
.loading-details
|
.loading-details
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 20px
|
top: 86px
|
||||||
left: 50%
|
left: 50%
|
||||||
$WIDTH: 1000px
|
$WIDTH: 450px
|
||||||
width: $WIDTH
|
width: $WIDTH
|
||||||
min-height: 60px
|
height: 450px
|
||||||
margin-left: (-$WIDTH / 2)
|
margin-left: (-$WIDTH / 2)
|
||||||
z-index: 100
|
z-index: 100
|
||||||
background-color: rgba(220, 255, 230, 0.6)
|
background: transparent url(/images/level/code_editor_background.png) no-repeat
|
||||||
|
background-size: 100% 100%
|
||||||
color: darkslategray
|
color: darkslategray
|
||||||
font-size: 15px
|
font-size: 15px
|
||||||
border-radius: 30px
|
padding: 80px 80px 40px 80px
|
||||||
padding: 10px
|
|
||||||
text-align: center
|
text-align: center
|
||||||
// http://matthewlein.com/ceaser/ Bounce down a bit, then snap up.
|
// http://matthewlein.com/ceaser/ Bounce down a bit, then snap up.
|
||||||
@include transition(top $UNVEIL_TIME cubic-bezier(0.285, -0.595, 0.670, -0.600))
|
@include transition(top $UNVEIL_TIME cubic-bezier(0.285, -0.595, 0.670, -0.600))
|
||||||
|
font-family: 'Open Sans Condensed'
|
||||||
|
|
||||||
|
.level-loading-goals
|
||||||
|
text-align: left
|
||||||
|
|
||||||
|
.goals-title
|
||||||
|
font-size: 32px
|
||||||
|
color: black
|
||||||
|
font-weight: bold
|
||||||
|
|
||||||
|
li
|
||||||
|
font-size: 20px
|
||||||
|
color: black
|
||||||
|
|
||||||
|
.progress-or-start-container
|
||||||
|
position: absolute
|
||||||
|
bottom: 95px
|
||||||
|
width: 261px
|
||||||
|
height: 80px
|
||||||
|
left: 80px
|
||||||
|
|
||||||
.load-progress
|
.load-progress
|
||||||
position: absolute
|
width: 100%
|
||||||
left: 2%
|
height: 36px
|
||||||
top: 0px
|
margin: 20px auto 0 auto
|
||||||
opacity: 0.6
|
|
||||||
width: 96%
|
|
||||||
height: 40px
|
|
||||||
margin: 10px auto 0
|
|
||||||
|
|
||||||
.progress
|
.progress
|
||||||
height: 100%
|
height: 100%
|
||||||
|
position: relative
|
||||||
|
background-color: transparent
|
||||||
|
|
||||||
.progress-bar
|
.progress-bar
|
||||||
width: 1%
|
width: 1%
|
||||||
height: 100%
|
height: 100%
|
||||||
transition-duration: 0
|
transition-duration: 0
|
||||||
|
border-radius: 9px
|
||||||
|
background: transparent url(/images/level/loading_bar_fill.png) no-repeat
|
||||||
|
|
||||||
&.active .progress-bar
|
&.active .progress-bar
|
||||||
transition-duration: 1.2s
|
transition-duration: 1.2s
|
||||||
|
|
||||||
#tip-wrapper
|
.rim
|
||||||
position: relative
|
position: absolute
|
||||||
z-index: 2
|
left: 0
|
||||||
top: 10px
|
top: 0
|
||||||
|
width: 100%
|
||||||
.level-loading-goals
|
height: 100%
|
||||||
margin: 30px auto 10px
|
background: transparent url(/images/level/loading_bar_rim.png) no-repeat
|
||||||
width: 400px
|
background-size: 100% 100%
|
||||||
|
|
||||||
.panel-heading
|
|
||||||
font-size: 24px
|
|
||||||
|
|
||||||
.list-group-item
|
|
||||||
font-size: 20px
|
|
||||||
|
|
||||||
.start-level-button
|
.start-level-button
|
||||||
|
display: none
|
||||||
|
width: 100%
|
||||||
|
margin: 0px auto
|
||||||
font-size: 40px
|
font-size: 40px
|
||||||
font-variant: small-caps
|
font-variant: small-caps
|
||||||
|
|
||||||
|
#tip-wrapper
|
||||||
|
position: absolute
|
||||||
|
z-index: 2
|
||||||
|
bottom: 40px
|
||||||
|
left: 25px
|
||||||
|
width: 401px
|
||||||
|
color: #666
|
||||||
|
|
||||||
.left-wing, .right-wing
|
.left-wing, .right-wing
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|
|
@ -4,9 +4,19 @@
|
||||||
|
|
||||||
.loading-details.loading-container
|
.loading-details.loading-container
|
||||||
|
|
||||||
|
.level-loading-goals.secret
|
||||||
|
.goals-title(data-i18n="play_level.goals") Goals
|
||||||
|
ul.list-unstyled
|
||||||
|
|
||||||
|
.errors
|
||||||
|
|
||||||
|
.progress-or-start-container
|
||||||
|
button.start-level-button.btn.btn-lg.btn-success.header-fontneedsclick(data-i18n="play_level.loading_start") Start Level
|
||||||
|
|
||||||
.load-progress
|
.load-progress
|
||||||
.progress
|
.progress
|
||||||
.progress-bar.progress-bar-success
|
.progress-bar.progress-bar-success
|
||||||
|
.rim
|
||||||
|
|
||||||
#tip-wrapper
|
#tip-wrapper
|
||||||
strong.tip(data-i18n='play_level.tip_toggle_play') Toggle play/paused with Ctrl+P.
|
strong.tip(data-i18n='play_level.tip_toggle_play') Toggle play/paused with Ctrl+P.
|
||||||
|
@ -41,11 +51,3 @@
|
||||||
strong.tip.rare
|
strong.tip.rare
|
||||||
span(data-i18n='play_level.tip_harry') Yer a Wizard,
|
span(data-i18n='play_level.tip_harry') Yer a Wizard,
|
||||||
span= me.get('name', true)
|
span= me.get('name', true)
|
||||||
|
|
||||||
.errors
|
|
||||||
|
|
||||||
.panel.panel-default.level-loading-goals.secret
|
|
||||||
.panel-heading.header-font(data-i18n="play_level.goals") Goals
|
|
||||||
ul.list-group
|
|
||||||
|
|
||||||
button.start-level-button.btn.btn-lg.btn-success.header-font.secret.needsclick(data-i18n="play_level.loading_start") Start Level
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ module.exports = class LevelLoadingView extends CocoView
|
||||||
goalCount = 0
|
goalCount = 0
|
||||||
for goalID, goal of @level.get('goals') when (not goal.team or goal.team is e.team) and not goal.hiddenGoal
|
for goalID, goal of @level.get('goals') when (not goal.team or goal.team is e.team) and not goal.hiddenGoal
|
||||||
name = utils.i18n goal, 'name'
|
name = utils.i18n goal, 'name'
|
||||||
goalList.append $('<li class="list-group-item">' + name + '</li>')
|
goalList.append $('<li>' + name + '</li>')
|
||||||
++goalCount
|
++goalCount
|
||||||
if goalCount
|
if goalCount
|
||||||
goalContainer.removeClass('secret')
|
goalContainer.removeClass('secret')
|
||||||
|
@ -68,8 +68,8 @@ module.exports = class LevelLoadingView extends CocoView
|
||||||
@unveil()
|
@unveil()
|
||||||
else
|
else
|
||||||
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'level_loaded', volume: 0.75 # old: loading_ready
|
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'level_loaded', volume: 0.75 # old: loading_ready
|
||||||
@$el.find('.progress').addClass 'active progress-striped'
|
@$el.find('.progress').hide()
|
||||||
@$el.find('.start-level-button').removeClass 'secret'
|
@$el.find('.start-level-button').show()
|
||||||
|
|
||||||
startUnveiling: (e) ->
|
startUnveiling: (e) ->
|
||||||
@playSound 'menu-button-click'
|
@playSound 'menu-button-click'
|
||||||
|
|
Loading…
Add table
Reference in a new issue