Show videos in HD if possible. Use ready state on level loader.

This commit is contained in:
Nick Winter 2014-03-17 05:52:19 -07:00
parent 3d56cc4393
commit 6c2a78c060
6 changed files with 22 additions and 6 deletions

View file

@ -225,6 +225,20 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
editor_config_indentguides_description: "Displays vertical lines to see indentation better."
editor_config_behaviors_label: "Smart Behaviors"
editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
loading_ready: "Ready!"
tip_insert_positions: "Shift+Click a point on the map to insert it into the spell editor."
tip_toggle_play: "Toggle play/paused with Ctrl+P."
tip_scrub_shortcut: "Ctrl+[ and Ctrl+] rewind and fast-forward."
tip_guide_exists: "Click the guide at the top of the page for useful info."
tip_open_source: "CodeCombat is 100% open source!"
tip_beta_launch: "CodeCombat launched its beta in October, 2013."
tip_js_beginning: "JavaScript is just the beginning."
tip_autocast_setting: "Adjust autocast settings by clicking the gear on the cast button."
tip_baby_coders: "In the future, even babies will be Archmages."
tip_morale_improves: "Loading will continue until morale improves."
tip_all_species: "We believe in equal opportunities to learn programming for all species."
tip_reticulating: "Reticulating spines."
tip_harry: "Yer a Wizard, "
admin:
av_title: "Admin Views"

View file

@ -5,7 +5,7 @@ block content
h1#site-slogan(data-i18n="home.slogan") Learn to Code JavaScript by Playing a Game
#trailer-wrapper
<iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3" frameborder="0" allowfullscreen></iframe>
<iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3&vq=hd720" frameborder="0" allowfullscreen></iframe>
img(src="/images/pages/home/video_border.png")
hr

View file

@ -1,4 +1,5 @@
extends /templates/base
block content
div
ol.breadcrumb

View file

@ -7,7 +7,7 @@ block modal-header-content
block modal-body-content
.multiplayer-launch-wrapper
<iframe width="640" height="360" src="//www.youtube.com/embed/wfc0U74LFCk?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3" frameborder="0" allowfullscreen></iframe>
<iframe width="640" height="360" src="//www.youtube.com/embed/wfc0U74LFCk?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3&vq=hd720" frameborder="0" allowfullscreen></iframe>
img(src="/images/pages/home/video_border.png")
h3(data-i18n="multiplayer_launch.to_battle") To Battle, Developers!

View file

@ -8,7 +8,7 @@ module.exports = class LevelLoadingView extends View
subscriptions:
'level-loader:progress-changed': 'onLevelLoaderProgressChanged'
afterRender: ->
@$el.find('.tip.rare').remove() if _.random(1, 10) < 9
tips = @$el.find('.tip').addClass('to-remove')
@ -22,11 +22,12 @@ module.exports = class LevelLoadingView extends View
@updateProgressBar()
updateProgressBar: ->
#@text.text = "BUILDING" if @progress is 1
@$el.find('.progress-bar').css('width', (100 * @progress) + '%')
showReady: ->
@$el.find('h2').addClass('ready').text 'Ready!'
ready = $.i18n.t('play_level.loading_ready', defaultValue: 'Ready!')
@$el.find('#tip-wrapper .tip').addClass('ready').text ready
Backbone.Mediator.publish 'play-sound', trigger: 'loading_ready', volume: 0.75
unveil: ->
_.delay @reallyUnveil, 1000

View file

@ -149,8 +149,8 @@ module.exports = class PlayLevelView extends View
onLevelLoaderLoaded: ->
return unless @levelLoader.progress() is 1 # double check, since closing the guide may trigger this early
@loadingView.showReady()
if window.currentModal and not window.currentModal.destroyed
@loadingView.showReady()
return Backbone.Mediator.subscribeOnce 'modal-closed', @onLevelLoaderLoaded, @
# Save latest level played in local storage