Merge pull request #1545 from codecombat/master

Master into production
This commit is contained in:
Michael Schmatz 2014-09-11 16:14:31 -04:00
commit 59c1cab0f9
16 changed files with 218 additions and 167 deletions

View file

@ -53,10 +53,6 @@
<script> <script>
window.userObject = "userObjectTag"; window.userObject = "userObjectTag";
</script> </script>
<script type="text/javascript">
var _bftn_options = { animation: 'banner' }
</script>
<script src="//widget.battleforthenet.com/widget.min.js" async></script>
<script>require('initialize');</script> <script>require('initialize');</script>
</head> </head>

View file

@ -3,6 +3,7 @@ AudioPlayer = require 'lib/AudioPlayer'
{me} = require 'lib/auth' {me} = require 'lib/auth'
CROSSFADE_LENGTH = 1500 CROSSFADE_LENGTH = 1500
MUSIC_VOLUME = 0.6
module.exports = class MusicPlayer extends CocoClass module.exports = class MusicPlayer extends CocoClass
currentMusic: null currentMusic: null
@ -51,7 +52,7 @@ module.exports = class MusicPlayer extends CocoClass
return unless @currentMusic return unless @currentMusic
@currentMusic.volume = 0.0 @currentMusic.volume = 0.0
if me.get('music') if me.get('music')
createjs.Tween.get(@currentMusic).to({volume: 1.0}, CROSSFADE_LENGTH) createjs.Tween.get(@currentMusic).to({volume: MUSIC_VOLUME}, CROSSFADE_LENGTH)
onMusicSettingChanged: -> onMusicSettingChanged: ->
@updateMusicVolume() @updateMusicVolume()
@ -59,7 +60,7 @@ module.exports = class MusicPlayer extends CocoClass
updateMusicVolume: -> updateMusicVolume: ->
return unless @currentMusic return unless @currentMusic
createjs.Tween.removeTweens(@currentMusic) createjs.Tween.removeTweens(@currentMusic)
@currentMusic.volume = if me.get('music') then 1.0 else 0.0 @currentMusic.volume = if me.get('music') then MUSIC_VOLUME else 0.0
destroy: -> destroy: ->
me.off 'change:music', @onMusicSettingChanged, @ me.off 'change:music', @onMusicSettingChanged, @

View file

@ -457,12 +457,12 @@ module.exports = Surface = class Surface extends CocoClass
onMouseDown: (e) => onMouseDown: (e) =>
return if @disabled return if @disabled
newPos = @camera.screenToCanvas({x: e.stageX, y: e.stageY}) cap = @camera.screenToCanvas({x: e.stageX, y: e.stageY})
# getObject(s)UnderPoint is broken, so we have to use the private method to get what we want # getObject(s)UnderPoint is broken, so we have to use the private method to get what we want
onBackground = not @stage._getObjectsUnderPoint(newPos.x, newPos.y, null, true) onBackground = not @stage._getObjectsUnderPoint(e.stageX, e.stageY, null, true)
worldPos = @camera.screenToWorld x: e.stageX, y: e.stageY wop = @camera.screenToWorld x: e.stageX, y: e.stageY
event = onBackground: onBackground, x: e.stageX, y: e.stageY, originalEvent: e, worldPos: worldPos event = onBackground: onBackground, x: e.stageX, y: e.stageY, originalEvent: e, worldPos: wop
Backbone.Mediator.publish 'surface:stage-mouse-down', event Backbone.Mediator.publish 'surface:stage-mouse-down', event
Backbone.Mediator.publish 'tome:focus-editor', {} Backbone.Mediator.publish 'tome:focus-editor', {}

View file

@ -79,7 +79,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
recover: recover:
recover_account_title: "Recuperar Cuenta" recover_account_title: "Recuperar Cuenta"
send_password: "Enviar recuperación de contraseña" send_password: "Enviar recuperación de contraseña"
# recovery_sent: "Recovery email sent." recovery_sent: "Email de recuperación de contraseña enviado."
signup: signup:
create_account_title: "Crea una cuenta para guardar tu progreso" create_account_title: "Crea una cuenta para guardar tu progreso"
@ -188,7 +188,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
email_announcements: "Noticias" email_announcements: "Noticias"
email_announcements_description: "Recibe correos electrónicos con las últimas noticias y desarrollos de CodeCombat." email_announcements_description: "Recibe correos electrónicos con las últimas noticias y desarrollos de CodeCombat."
email_notifications: "Notificationes" email_notifications: "Notificationes"
# email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity." email_notifications_summary: "Controles para personalizar las notificaciones por email automaticas, relacionadas con tu actividad en CodeCombat."
email_any_notes: "Cualquier Notificacion" email_any_notes: "Cualquier Notificacion"
email_any_notes_description: "Deshabilitar todas las notificaciones por mail." email_any_notes_description: "Deshabilitar todas las notificaciones por mail."
email_news: "Noticias" email_news: "Noticias"
@ -216,7 +216,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
profile_for_prefix: "Perfil de " profile_for_prefix: "Perfil de "
profile_for_suffix: "" profile_for_suffix: ""
featured: "Destacado" featured: "Destacado"
# not_featured: "Not Featured" not_featured: "Sin Destacar"
looking_for: "Buscando:" looking_for: "Buscando:"
last_updated: "Última actualización:" last_updated: "Última actualización:"
contact: "Contacto" contact: "Contacto"
@ -234,8 +234,8 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
# next_education: "recount your educational ordeals." # next_education: "recount your educational ordeals."
next_projects: "Muestranos tres proyectos en los que hayas trabajado." next_projects: "Muestranos tres proyectos en los que hayas trabajado."
next_links: "añade links personales o de redes sociales." next_links: "añade links personales o de redes sociales."
# next_photo: "add an optional professional photo." next_photo: "añadir una foto para el perfil profesional."
# next_active: "mark yourself open to offers to show up in searches." next_active: "mostrarte abierto a ofertas en las busquedas."
example_blog: "Blog" example_blog: "Blog"
example_personal_site: "Web personal" example_personal_site: "Web personal"
links_header: "Enlaces Personales" links_header: "Enlaces Personales"
@ -244,38 +244,38 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
links_name_help: "¿Qué estás enlazando?" links_name_help: "¿Qué estás enlazando?"
links_link_blurb: "URL del enlace" links_link_blurb: "URL del enlace"
basics_header: "Actualizar información básica" basics_header: "Actualizar información básica"
# basics_active: "Open to Offers" basics_active: "Abierto a ofertas"
# basics_active_help: "Want interview offers right now?" basics_active_help: "Buscas entrevistas de trabajo ahora?"
# basics_job_title: "Desired Job Title" # basics_job_title: "Desired Job Title"
# basics_job_title_help: "What role are you looking for?" basics_job_title_help: "Que tipo de rol estas buscando?"
basics_city: "Ciudad" basics_city: "Ciudad"
basics_city_help: "Ciudad en la que quieres trabajar (o en la que vives actualmente)." basics_city_help: "Ciudad en la que quieres trabajar (o en la que vives actualmente)."
basics_country: "País" basics_country: "País"
basics_country_help: "País en la que quieres trabajar (o en la que vives actualmente)." basics_country_help: "País en la que quieres trabajar (o en la que vives actualmente)."
# basics_visa: "US Work Status" basics_visa: "Estatus de Trabajo en EEUU"
# basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship? (If you live in Canada or Australia, mark authorized.)" basics_visa_help: "Estas autorizado a trabajar en EEUU, o necesitas una visa patrocinada? (Si vives en Canada o Australia, marca autorizado.)"
# basics_looking_for: "Looking For" basics_looking_for: "Estoy Buscando"
basics_looking_for_full_time: "Full-time (tiempo completo)" basics_looking_for_full_time: "Full-time (tiempo completo)"
# basics_looking_for_part_time: "Part-time" basics_looking_for_part_time: "Tiempo Partido"
# basics_looking_for_remote: "Remote" basics_looking_for_remote: "Desde Casa"
# basics_looking_for_contracting: "Contracting" basics_looking_for_contracting: "Contractual"
# basics_looking_for_internship: "Internship" basics_looking_for_internship: "Interino"
# basics_looking_for_help: "What kind of developer position do you want?" basics_looking_for_help: "Que tipo de puesto de desarrollo te gustaria?"
name_header: "Escriba su nombre" name_header: "Escriba su nombre"
name_anonymous: "Desarrollador Anónimo" name_anonymous: "Desarrollador Anónimo"
# name_help: "Name you want employers to see, like 'Nick Winter'." name_help: "Esto es lo que quieres que vean las empresas, algo como 'Nick Winter'."
short_description_header: "Escriba una breve descripción sobre usted." short_description_header: "Escriba una breve descripción sobre usted."
# short_description_blurb: "Add a tagline to help an employer quickly learn more about you." short_description_blurb: "Añade una frase que ayude a las empresas a hacerse una idea de ti."
# short_description: "Tagline" # short_description: "Tagline"
short_description_help: "¿Quién eres, y qué estás buscando? 140 caracteres como máximo." short_description_help: "¿Quién eres, y qué estás buscando? 140 caracteres como máximo."
# skills_header: "Skills" skills_header: "Habilidades"
# skills_help: "Tag relevant developer skills in order of proficiency." # skills_help: "Tag relevant developer skills in order of proficiency."
# long_description_header: "Describe your desired position" long_description_header: "Describenos tu trabajo soñado"
# long_description_blurb: "Tell employers how awesome you are and what role you want." long_description_blurb: "Cuenta a tus empleadores lo impresionante que eres y que trabajo estas buscando."
long_description: "Descripción Personal" long_description: "Descripción Personal"
# long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max." # long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
work_experience: "Experiencia laboral" work_experience: "Experiencia laboral"
# work_header: "Chronicle your work history" work_header: "Cuentanos un poco de tu historial laboral"
work_years: "Años de experiencia" work_years: "Años de experiencia"
# work_years_help: "How many years of professional experience (getting paid) developing software do you have?" # work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
# work_blurb: "List your relevant work experience, most recent first." # work_blurb: "List your relevant work experience, most recent first."
@ -301,51 +301,51 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
our_notes: "Nuestras notas" our_notes: "Nuestras notas"
# remarks: "Remarks" # remarks: "Remarks"
projects: "Proyectos" projects: "Proyectos"
# projects_header: "Add 3 projects" projects_header: "Añade 3 proyectos"
# projects_header_2: "Projects (Top 3)" projects_header_2: "Proyectos (Top 3)"
# projects_blurb: "Highlight your projects to amaze employers." # projects_blurb: "Highlight your projects to amaze employers."
# project_name: "Project Name" project_name: "Nombre del proyecto"
# project_name_help: "What was the project called?" project_name_help: "Como se llamaba el proyecto?"
project_description: "Descripción" project_description: "Descripción"
# project_description_help: "Briefly describe the project." project_description_help: "Describe el proyecto brevemente."
# project_picture: "Picture" project_picture: "Foto"
# project_picture_help: "Upload a 230x115px or larger image showing off the project." project_picture_help: "Sube una imagen de 230x115px o mas grande enseñandonos el proyecto."
# project_link: "Link" project_link: "Enlace"
# project_link_help: "Link to the project." project_link_help: "Enlace al proyecto."
# player_code: "Player Code" player_code: "Codigo de Jugador"
employers: employers:
# hire_developers_not_credentials: "Hire developers, not credentials." hire_developers_not_credentials: "Contrata desarrolladores, no credenciales."
# get_started: "Get Started" get_started: "Empezar"
# already_screened: "We've already technically screened all our candidates" # already_screened: "We've already technically screened all our candidates"
# filter_further: ", but you can also filter further:" # filter_further: ", but you can also filter further:"
# filter_visa: "Visa" filter_visa: "Visa"
# filter_visa_yes: "US Authorized" filter_visa_yes: "Autorizado en EEUU"
# filter_visa_no: "Not Authorized" filter_visa_no: "No Autorizado"
# filter_education_top: "Top School" # filter_education_top: "Top School"
# filter_education_other: "Other" # filter_education_other: "Other"
# filter_role_web_developer: "Web Developer" filter_role_web_developer: "Desarrollador Web"
# filter_role_software_developer: "Software Developer" filter_role_software_developer: "Desarrollador de Software"
# filter_role_mobile_developer: "Mobile Developer" filter_role_mobile_developer: "Desarrollador de Mobiles"
# filter_experience: "Experience" filter_experience: "Experiencia"
# filter_experience_senior: "Senior" filter_experience_senior: "Senior"
# filter_experience_junior: "Junior" filter_experience_junior: "Junior"
# filter_experience_recent_grad: "Recent Grad" filter_experience_recent_grad: "Recien Graduado"
# filter_experience_student: "College Student" filter_experience_student: "Estudiante Universitario"
# filter_results: "results" filter_results: "notas"
# start_hiring: "Start hiring." start_hiring: "Comenzar a contratar."
# reasons: "Three reasons you should hire through us:" reasons: "Tres razones por las que deberias contratar a traves de nosotros:"
# everyone_looking: "Everyone here is looking for their next opportunity." everyone_looking: "Todo el mundo aqui esta buscando su proxima oportunidad."
# everyone_looking_blurb: "Forget about 20% LinkedIn InMail response rates. Everyone that we list on this site wants to find their next position and will respond to your request for an introduction." # everyone_looking_blurb: "Forget about 20% LinkedIn InMail response rates. Everyone that we list on this site wants to find their next position and will respond to your request for an introduction."
# weeding: "Sit back; we've done the weeding for you." weeding: "Sientate; nosotros hemos hecho el trabajo por ti."
# weeding_blurb: "Every player that we list has been screened for technical ability. We also perform phone screens for select candidates and make notes on their profiles to save you time." weeding_blurb: "Todos los jugadores que ponemos en la lista ha sido seguido por sus habilidades tecnicas. Tambien hacemos llamadas de telefono para los candidatos seleccionados y haz notas en sus perfiles para ahorrar tiempo."
# pass_screen: "They will pass your technical screen." # pass_screen: "They will pass your technical screen."
# pass_screen_blurb: "Review each candidate's code before reaching out. One employer found that 5x as many of our devs passed their technical screen than hiring from Hacker News." # pass_screen_blurb: "Review each candidate's code before reaching out. One employer found that 5x as many of our devs passed their technical screen than hiring from Hacker News."
# make_hiring_easier: "Make my hiring easier, please." make_hiring_easier: "Hacer mi contratacion mas facil, por favor."
what: "¿Qué es CodeCombat?" what: "¿Qué es CodeCombat?"
# what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. Our players have experience with all major tech stacks." # what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. Our players have experience with all major tech stacks."
# cost: "How much do we charge?" cost: "Cuanto cobramos?"
# cost_blurb: "We charge 15% of first year's salary and offer a 100% money back guarantee for 90 days. We don't charge for candidates who are already actively being interviewed at your company." cost_blurb: "Cobramos el 15% del salario del primer año y ofrecemos reembolso del 100% del dinero durante 90 dias. No cobramos a los candidatos que ya estan siendo entrevistados en tu compañia."
candidate_name: "Nombre" candidate_name: "Nombre"
candidate_location: "Ubicación" candidate_location: "Ubicación"
candidate_looking_for: "Buscando" candidate_looking_for: "Buscando"
@ -353,10 +353,10 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
candidate_top_skills: "Mejores Habilidades" candidate_top_skills: "Mejores Habilidades"
candidate_years_experience: "Años Exp" candidate_years_experience: "Años Exp"
candidate_last_updated: "Última actualización" candidate_last_updated: "Última actualización"
# candidate_who: "Who" candidate_who: "Quien"
# featured_developers: "Featured Developers" featured_developers: "Desarrolladores Destacados"
# other_developers: "Other Developers" other_developers: "Otros Desarrolladores"
# inactive_developers: "Inactive Developers" inactive_developers: "Desarrolladores Inactivos"
play_level: play_level:
done: "Hecho" done: "Hecho"
@ -446,7 +446,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
multiplayer_tab: "Multijugador" multiplayer_tab: "Multijugador"
inventory_caption: "Equipa a tu heroe" inventory_caption: "Equipa a tu heroe"
choose_hero_caption: "Elige la lengua del heroe" choose_hero_caption: "Elige la lengua del heroe"
# save_load_caption: "... and view history" save_load_caption: "... y ver la historia"
options_caption: "Ajustes de configuracion" options_caption: "Ajustes de configuracion"
guide_caption: "Documentos y pistas" guide_caption: "Documentos y pistas"
multiplayer_caption: "Juega con amigos!" multiplayer_caption: "Juega con amigos!"
@ -467,7 +467,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
music_label: "Musica" music_label: "Musica"
music_description: "Musica de fondo on/off." music_description: "Musica de fondo on/off."
# autorun_label: "Autorun" # autorun_label: "Autorun"
# autorun_description: "Control automatic code execution." autorun_description: "Control automatico de codigo en ejecucion."
editor_config: "Conf. editor" editor_config: "Conf. editor"
editor_config_title: "Configuración del editor" editor_config_title: "Configuración del editor"
editor_config_level_language_label: "Lenguaje para este nivel" editor_config_level_language_label: "Lenguaje para este nivel"

View file

@ -3,37 +3,37 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
loading: "Caricamento in corso..." loading: "Caricamento in corso..."
saving: "Salvataggio in corso..." saving: "Salvataggio in corso..."
sending: "Invio in corso..." sending: "Invio in corso..."
# send: "Send" send: "Invia"
cancel: "Annulla" cancel: "Annulla"
save: "Salva" save: "Salva"
# publish: "Publish" publish: "Pubblica"
# create: "Create" create: "Crea"
delay_1_sec: "1 secondo" delay_1_sec: "1 secondo"
delay_3_sec: "3 secondi" delay_3_sec: "3 secondi"
delay_5_sec: "5 secondi" delay_5_sec: "5 secondi"
manual: "Manuale" manual: "Manuale"
fork: "Fork" fork: "Fork"
play: "Gioca" play: "Gioca"
# retry: "Retry" retry: "Riprova"
# watch: "Watch" watch: "Guarda"
# unwatch: "Unwatch" # unwatch: "Unwatch"
# submit_patch: "Submit Patch" submit_patch: "Invia Patch"
# units: units:
# second: "second" second: "secondo"
# seconds: "seconds" seconds: "secondi"
# minute: "minute" minute: "minuto"
# minutes: "minutes" minutes: "minuti"
# hour: "hour" hour: "ora"
# hours: "hours" hours: "ore"
# day: "day" day: "giorno"
# days: "days" days: "giorni"
# week: "week" week: "settimana"
# weeks: "weeks" weeks: "settimane"
# month: "month" month: "mese"
# months: "months" months: "mesi"
# year: "year" year: "anno"
# years: "years" years: "anni"
modal: modal:
close: "Chiudi" close: "Chiudi"
@ -48,9 +48,9 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
editor: "Editor" editor: "Editor"
blog: "Blog" blog: "Blog"
forum: "Forum" forum: "Forum"
# account: "Account" account: "Account"
# profile: "Profile" profile: "Profilo"
# stats: "Stats" stats: "Statistiche"
# code: "Code" # code: "Code"
admin: "Amministratore" admin: "Amministratore"
home: "Pagina iniziale" home: "Pagina iniziale"
@ -90,7 +90,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
creating: "Creazione account..." creating: "Creazione account..."
sign_up: "Registrati" sign_up: "Registrati"
log_in: "Accedi con la password" log_in: "Accedi con la password"
# social_signup: "Or, you can sign up through Facebook or G+:" social_signup: "Oppure puoi registrarti con Facebook o Google+:"
# required: "You need to log in before you can go that way." # required: "You need to log in before you can go that way."
home: home:
@ -102,7 +102,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
old_browser_suffix: "Puoi provare lo stesso, ma probabilmente non funzionerà." old_browser_suffix: "Puoi provare lo stesso, ma probabilmente non funzionerà."
campaign: "Campagna" campaign: "Campagna"
for_beginners: "Per Principianti" for_beginners: "Per Principianti"
# multiplayer: "Multiplayer" multiplayer: "Multiplayer"
for_developers: "Per Sviluppatori" for_developers: "Per Sviluppatori"
# javascript_blurb: "The language of the web. Great for writing websites, web apps, HTML5 games, and servers." # javascript_blurb: "The language of the web. Great for writing websites, web apps, HTML5 games, and servers."
# python_blurb: "Simple yet powerful, Python is a great general purpose programming language." # python_blurb: "Simple yet powerful, Python is a great general purpose programming language."
@ -124,13 +124,13 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
campaign_multiplayer_description: "... nelle quali programmi faccia a faccia contro altri giocatori." campaign_multiplayer_description: "... nelle quali programmi faccia a faccia contro altri giocatori."
campaign_player_created: "Creati dai giocatori" campaign_player_created: "Creati dai giocatori"
campaign_player_created_description: "... nei quali affronterai la creatività dei tuoi compagni <a href=\"/contribute#artisan\">Stregoni Artigiani</a>." campaign_player_created_description: "... nei quali affronterai la creatività dei tuoi compagni <a href=\"/contribute#artisan\">Stregoni Artigiani</a>."
# campaign_classic_algorithms: "Classic Algorithms" campaign_classic_algorithms: "Algoritmi classici"
# campaign_classic_algorithms_description: "... in which you learn the most popular algorithms in Computer Science." # campaign_classic_algorithms_description: "... in which you learn the most popular algorithms in Computer Science."
level_difficulty: "Difficoltà: " level_difficulty: "Difficoltà: "
play_as: "Gioca come " play_as: "Gioca come "
spectate: "Spettatore" spectate: "Spettatore"
# players: "players" players: "giocatori"
# hours_played: "hours played" hours_played: "ore di gioco"
contact: contact:
contact_us: "Contatta CodeCombat" contact_us: "Contatta CodeCombat"
@ -175,7 +175,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
autosave: "Modifiche salvate automaticamente" autosave: "Modifiche salvate automaticamente"
me_tab: "Io" me_tab: "Io"
picture_tab: "Immagine" picture_tab: "Immagine"
# upload_picture: "Upload a picture" upload_picture: "Carica immagine"
wizard_tab: "Stregone" wizard_tab: "Stregone"
password_tab: "Password" password_tab: "Password"
emails_tab: "Email" emails_tab: "Email"
@ -191,9 +191,9 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
# email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity." # email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
# email_any_notes: "Any Notifications" # email_any_notes: "Any Notifications"
# email_any_notes_description: "Disable to stop all activity notification emails." # email_any_notes_description: "Disable to stop all activity notification emails."
# email_news: "News" email_news: "Novità"
# email_recruit_notes: "Job Opportunities" email_recruit_notes: "Lavora con noi"
# email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job." email_recruit_notes_description: "Se sai giocare molto bene potremmo contattarti per offrirti un lavoro (migliore)."
contributor_emails: "Email dei collaboratori" contributor_emails: "Email dei collaboratori"
contribute_prefix: "Stiamo cercando persone che si uniscano al nostro gruppo! Dai un'occhiata alla " contribute_prefix: "Stiamo cercando persone che si uniscano al nostro gruppo! Dai un'occhiata alla "
contribute_page: "pagina dei collaboratori" contribute_page: "pagina dei collaboratori"
@ -210,8 +210,8 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
# view_profile: "View Your Profile" # view_profile: "View Your Profile"
account_profile: account_profile:
# settings: "Settings" settings: "Impostazioni"
# edit_profile: "Edit Profile" edit_profile: "Modifica Profilo"
# done_editing: "Done Editing" # done_editing: "Done Editing"
profile_for_prefix: "Profilo di " profile_for_prefix: "Profilo di "
profile_for_suffix: "" profile_for_suffix: ""
@ -362,14 +362,14 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
done: "Fatto" done: "Fatto"
customize_wizard: "Personalizza stregone" customize_wizard: "Personalizza stregone"
home: "Pagina iniziale" home: "Pagina iniziale"
# stop: "Stop" stop: "Stop"
# game_menu: "Game Menu" game_menu: "Menu"
guide: "Guida" guide: "Guida"
restart: "Ricomincia" restart: "Ricomincia"
goals: "Obiettivi" goals: "Obiettivi"
# success: "Success!" # success: "Success!"
# incomplete: "Incomplete" incomplete: "Incompleto"
# timed_out: "Ran out of time" timed_out: "Tempo Scaduto"
# failing: "Failing" # failing: "Failing"
action_timeline: "Barra temporale delle azioni" action_timeline: "Barra temporale delle azioni"
click_to_select: "Clicca un'unità per selezionarla." click_to_select: "Clicca un'unità per selezionarla."
@ -401,7 +401,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
spell_saved: "Magia Salvata" spell_saved: "Magia Salvata"
skip_tutorial: "Salta (esc)" skip_tutorial: "Salta (esc)"
# keyboard_shortcuts: "Key Shortcuts" # keyboard_shortcuts: "Key Shortcuts"
# loading_ready: "Ready!" loading_ready: "Pronto!"
# tip_insert_positions: "Shift+Click a point on the map to insert it into the spell editor." # 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_toggle_play: "Toggle play/paused with Ctrl+P."
# tip_scrub_shortcut: "Ctrl+[ and Ctrl+] rewind and fast-forward." # tip_scrub_shortcut: "Ctrl+[ and Ctrl+] rewind and fast-forward."
@ -438,18 +438,18 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
# infinite_loop_comment_out: "Comment Out My Code" # infinite_loop_comment_out: "Comment Out My Code"
game_menu: game_menu:
# inventory_tab: "Inventory" inventory_tab: "Inventario"
# choose_hero_tab: "Restart Level" choose_hero_tab: "Ricomincia Livello"
# save_load_tab: "Save/Load" save_load_tab: "Salva/Carico"
# options_tab: "Options" options_tab: "Opzioni"
# guide_tab: "Guide" guide_tab: "Guida"
multiplayer_tab: "Multigiocatore" multiplayer_tab: "Multigiocatore"
# inventory_caption: "Equip your hero" # inventory_caption: "Equip your hero"
# choose_hero_caption: "Choose hero, language" choose_hero_caption: "Scegli eroe, lingua"
# save_load_caption: "... and view history" # save_load_caption: "... and view history"
# options_caption: "Configure settings" # options_caption: "Configure settings"
# guide_caption: "Docs and tips" # guide_caption: "Docs and tips"
# multiplayer_caption: "Play with friends!" multiplayer_caption: "Gioca con i tuoi amici!"
# inventory: # inventory:
# temp: "Temp" # temp: "Temp"
@ -457,13 +457,13 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
# choose_hero: # choose_hero:
# temp: "Temp" # temp: "Temp"
# save_load: save_load:
# granularity_saved_games: "Saved" granularity_saved_games: "Salvato"
# granularity_change_history: "History" # granularity_change_history: "History"
# options: options:
# general_options: "General Options" # general_options: "General Options"
# volume_label: "Volume" volume_label: "Volume"
# music_label: "Music" # music_label: "Music"
# music_description: "Turn background music on/off." # music_description: "Turn background music on/off."
# autorun_label: "Autorun" # autorun_label: "Autorun"
@ -491,20 +491,20 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
multiplayer: multiplayer:
multiplayer_title: "Impostazioni multigiocatore" multiplayer_title: "Impostazioni multigiocatore"
# multiplayer_toggle: "Enable multiplayer" multiplayer_toggle: "Abilita multiplayer"
# multiplayer_toggle_description: "Allow others to join your game." multiplayer_toggle_description: "Permetti ad altri giocatori di unirsi alla partita."
multiplayer_link_description: "Dai questo link a chi vuoi che si unisca a te." multiplayer_link_description: "Dai questo link a chi vuoi che si unisca a te."
multiplayer_hint_label: "Suggerimento:" multiplayer_hint_label: "Suggerimento:"
multiplayer_hint: " Clicca il link per selezionare tutto, quindi premi CMD-C o Ctrl-C per copiare il link." multiplayer_hint: " Clicca il link per selezionare tutto, quindi premi CMD-C o Ctrl-C per copiare il link."
multiplayer_coming_soon: "Ulteriori aggiunte per il multigiocatore in arrivo!" multiplayer_coming_soon: "Ulteriori aggiunte per il multigiocatore in arrivo!"
# multiplayer_sign_in_leaderboard: "Sign in or create an account and get your solution on the leaderboard." # multiplayer_sign_in_leaderboard: "Sign in or create an account and get your solution on the leaderboard."
# keyboard_shortcuts: keyboard_shortcuts:
# keyboard_shortcuts: "Keyboard Shortcuts" # keyboard_shortcuts: "Keyboard Shortcuts"
# space: "Space" space: "Spazio"
# enter: "Enter" enter: "Invio"
# escape: "Escape" escape: "Esc"
# shift: "Shift" shift: "Maiusc"
# cast_spell: "Cast current spell." # cast_spell: "Cast current spell."
# run_real_time: "Run in real time." # run_real_time: "Run in real time."
# continue_script: "Continue past current script." # continue_script: "Continue past current script."
@ -517,7 +517,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
# toggle_grid: "Toggle grid overlay." # toggle_grid: "Toggle grid overlay."
# toggle_pathfinding: "Toggle pathfinding overlay." # toggle_pathfinding: "Toggle pathfinding overlay."
# beautify: "Beautify your code by standardizing its formatting." # beautify: "Beautify your code by standardizing its formatting."
# maximize_editor: "Maximize/minimize code editor." maximize_editor: "Ingrandisci/rimpicciolisci l'editor di programmazione."
# move_wizard: "Move your Wizard around the level." # move_wizard: "Move your Wizard around the level."
admin: admin:
@ -764,9 +764,9 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
# artisan_attribute_3: "For the time being, endurance en par with an Adventurer. Our Level Editor is super preliminary and frustrating to use. You have been warned!" # artisan_attribute_3: "For the time being, endurance en par with an Adventurer. Our Level Editor is super preliminary and frustrating to use. You have been warned!"
# artisan_join_desc: "Use the Level Editor in these steps, give or take:" # artisan_join_desc: "Use the Level Editor in these steps, give or take:"
# artisan_join_step1: "Read the documentation." # artisan_join_step1: "Read the documentation."
# artisan_join_step2: "Create a new level and explore existing levels." artisan_join_step2: "Crea un nuovo livello ed esplora quelli già esistenti."
# artisan_join_step3: "Find us in our public HipChat room for help." # artisan_join_step3: "Find us in our public HipChat room for help."
# artisan_join_step4: "Post your levels on the forum for feedback." artisan_join_step4: "Posta il tuo livello sul forum per ricevere del feedback."
more_about_artisan: "Leggi di più su cosa vuol dire diventare un creativo Artigiano" more_about_artisan: "Leggi di più su cosa vuol dire diventare un creativo Artigiano"
# artisan_subscribe_desc: "Get emails on level editor updates and announcements." # artisan_subscribe_desc: "Get emails on level editor updates and announcements."
# adventurer_summary: "Let us be clear about your role: you are the tank. You are going to take heavy damage. We need people to try out brand-new levels and help identify how to make things better. The pain will be enormous; making good games is a long process and no one gets it right the first time. If you can endure and have a high constitution score, then this class is for you." # adventurer_summary: "Let us be clear about your role: you are the tank. You are going to take heavy damage. We need people to try out brand-new levels and help identify how to make things better. The pain will be enormous; making good games is a long process and no one gets it right the first time. If you can endure and have a high constitution score, then this class is for you."
@ -784,7 +784,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
scribe_introduction_url_mozilla: "Rete di sviluppo di Mozilla" scribe_introduction_url_mozilla: "Rete di sviluppo di Mozilla"
# scribe_introduction_suf: " has built. If your idea of fun is articulating the concepts of programming in Markdown form, then this class might be for you." # scribe_introduction_suf: " has built. If your idea of fun is articulating the concepts of programming in Markdown form, then this class might be for you."
# scribe_attribute_1: "Skill in words is pretty much all you need. Not only grammar and spelling, but able to convey complicated ideas to others." # scribe_attribute_1: "Skill in words is pretty much all you need. Not only grammar and spelling, but able to convey complicated ideas to others."
# contact_us_url: "Contact us" contact_us_url: "Contattaci"
# scribe_join_description: "tell us a little about yourself, your experience with programming and what sort of things you'd like to write about. We'll go from there!" # scribe_join_description: "tell us a little about yourself, your experience with programming and what sort of things you'd like to write about. We'll go from there!"
more_about_scribe: "Leggi di più su cosa vuol dire diventare un diligente Scrivano" more_about_scribe: "Leggi di più su cosa vuol dire diventare un diligente Scrivano"
# scribe_subscribe_desc: "Get emails about article writing announcements." # scribe_subscribe_desc: "Get emails about article writing announcements."
@ -794,7 +794,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
diplomat_introduction_suf: "è che c'è un notevole interesse per CodeCombat negli altri paesi, in particolare in Brasile! Stiamo costruendo un corpo di traduttori per trasformare liste di parole in altre parole, per rendere CodeCombat accessibile il più possibile in tutto il mondo. Se ti piace l'idea di sbirciare nei contenuti futuri e di portare questi livelli ai tuoi connazionali il più presto possibile, questa categoria potrebbe essere la tua." diplomat_introduction_suf: "è che c'è un notevole interesse per CodeCombat negli altri paesi, in particolare in Brasile! Stiamo costruendo un corpo di traduttori per trasformare liste di parole in altre parole, per rendere CodeCombat accessibile il più possibile in tutto il mondo. Se ti piace l'idea di sbirciare nei contenuti futuri e di portare questi livelli ai tuoi connazionali il più presto possibile, questa categoria potrebbe essere la tua."
diplomat_attribute_1: "Competenza in inglese e nella lingua in cui vorresti tradurre. Per trasferire idee complesse è importante avere una solida capacità in entrambe!" diplomat_attribute_1: "Competenza in inglese e nella lingua in cui vorresti tradurre. Per trasferire idee complesse è importante avere una solida capacità in entrambe!"
# diplomat_join_pref_github: "Find your language locale file " # diplomat_join_pref_github: "Find your language locale file "
# diplomat_github_url: "on GitHub" diplomat_github_url: "su GitHub"
# diplomat_join_suf_github: ", edit it online, and submit a pull request. Also, check this box below to keep up-to-date on new internationalization developments!" # diplomat_join_suf_github: ", edit it online, and submit a pull request. Also, check this box below to keep up-to-date on new internationalization developments!"
more_about_diplomat: "Leggi di più su cosa vuol dire diventare un grande Diplomatico" more_about_diplomat: "Leggi di più su cosa vuol dire diventare un grande Diplomatico"
diplomat_subscribe_desc: "Ricevi messaggi email sullo sviluppo i18n e i livelli da tradurre." diplomat_subscribe_desc: "Ricevi messaggi email sullo sviluppo i18n e i livelli da tradurre."
@ -829,8 +829,8 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
ambassador_title_description: "(Supporto)" ambassador_title_description: "(Supporto)"
ladder: ladder:
# please_login: "Please log in first before playing a ladder game." please_login: "Per favore esegui il log in first prima di giocare una partita classificata ."
# my_matches: "My Matches" my_matches: "Le mie partite"
simulate: "Simula" simulate: "Simula"
# simulation_explanation: "By simulating games you can get your game ranked faster!" # simulation_explanation: "By simulating games you can get your game ranked faster!"
# simulate_games: "Simulate Games!" # simulate_games: "Simulate Games!"

View file

@ -79,7 +79,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
recover: recover:
recover_account_title: "Recuperar Conta" recover_account_title: "Recuperar Conta"
send_password: "Enviar Password de Recuperação" send_password: "Enviar Password de Recuperação"
# recovery_sent: "Recovery email sent." recovery_sent: "E-mail de recuperação enviado."
signup: signup:
create_account_title: "Criar Conta para Guardar Progresso" create_account_title: "Criar Conta para Guardar Progresso"
@ -307,12 +307,12 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
project_name: "Nome do Projeto" project_name: "Nome do Projeto"
# project_name_help: "What was the project called?" # project_name_help: "What was the project called?"
project_description: "Descrição" project_description: "Descrição"
# project_description_help: "Briefly describe the project." project_description_help: "Descreva o projeto em poucas palavras."
project_picture: "Imagem" project_picture: "Imagem"
# project_picture_help: "Upload a 230x115px or larger image showing off the project." # project_picture_help: "Upload a 230x115px or larger image showing off the project."
project_link: "Ligação" project_link: "Ligação"
# project_link_help: "Link to the project." # project_link_help: "Link to the project."
# player_code: "Player Code" player_code: "Código do Jogador"
employers: employers:
hire_developers_not_credentials: "Contrate programadores, não cartas de recomendação." hire_developers_not_credentials: "Contrate programadores, não cartas de recomendação."
@ -568,7 +568,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
level_tab_settings: "Configurações" level_tab_settings: "Configurações"
level_tab_components: "Componentes" level_tab_components: "Componentes"
level_tab_systems: "Sistemas" level_tab_systems: "Sistemas"
# level_tab_docs: "Documentation" level_tab_docs: "Documentação"
level_tab_thangs_title: "Thangs Atuais" level_tab_thangs_title: "Thangs Atuais"
level_tab_thangs_all: "Todos" level_tab_thangs_all: "Todos"
level_tab_thangs_conditions: "Condições Iniciais" level_tab_thangs_conditions: "Condições Iniciais"
@ -652,10 +652,10 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
why_paragraph_2_italic_caps: "NÃO MÃE, TENHO DE ACABAR O NÍVEL!" why_paragraph_2_italic_caps: "NÃO MÃE, TENHO DE ACABAR O NÍVEL!"
why_paragraph_2_suffix: "É por isso que o CodeCombat é um jogo multijogador, e não um jogo que não passa de um curso com lições. Nós não vamos parar enquanto não puder parar--mas desta vez, isso é uma coisa boa." why_paragraph_2_suffix: "É por isso que o CodeCombat é um jogo multijogador, e não um jogo que não passa de um curso com lições. Nós não vamos parar enquanto não puder parar--mas desta vez, isso é uma coisa boa."
why_paragraph_3: "Se vai ficar viciado em algum jogo, vicie-se neste e torne-se num dos feiticeiros da idade da tecnologia." why_paragraph_3: "Se vai ficar viciado em algum jogo, vicie-se neste e torne-se num dos feiticeiros da idade da tecnologia."
# press_title: "Bloggers/Press" press_title: "Bloggers/Imprensa"
# press_paragraph_1_prefix: "Want to write about us? Feel free to download and use all of the resources included in our" press_paragraph_1_prefix: "Quer escrever sobre nós? Sinta-se à vontade para descarregar e usar todos os recursos incluídos no nosso"
# press_paragraph_1_link: "press packet" press_paragraph_1_link: "pacote de imprensa"
# press_paragraph_1_suffix: ". All logos and images may be used without contacting us directly." press_paragraph_1_suffix: ". Todos os logótipos e imagens podem ser usados sem nos contactar diretamente."
team: "Equipa" team: "Equipa"
george_title: "CEO" george_title: "CEO"
george_blurb: "Homem de Negócios" george_blurb: "Homem de Negócios"
@ -695,9 +695,9 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
# recruitment_description_italic: "a lot" # recruitment_description_italic: "a lot"
# recruitment_description_ending: "the site remains free and everybody's happy. That's the plan." # recruitment_description_ending: "the site remains free and everybody's happy. That's the plan."
copyrights_title: "Direitos Autorais e Licensas" copyrights_title: "Direitos Autorais e Licensas"
# contributor_title: "Contributor License Agreement" contributor_title: "Contrato de Licença do Contribuinte (CLA)"
# contributor_description_prefix: "All contributions, both on the site and on our GitHub repository, are subject to our" # contributor_description_prefix: "All contributions, both on the site and on our GitHub repository, are subject to our"
# cla_url: "CLA" cla_url: "CLA"
# contributor_description_suffix: "to which you should agree before contributing." # contributor_description_suffix: "to which you should agree before contributing."
code_title: "Código - MIT" code_title: "Código - MIT"
# code_description_prefix: "All code owned by CodeCombat or hosted on codecombat.com, both in the GitHub repository or in the codecombat.com database, is licensed under the" # code_description_prefix: "All code owned by CodeCombat or hosted on codecombat.com, both in the GitHub repository or in the codecombat.com database, is licensed under the"

View file

@ -237,11 +237,15 @@ module.exports = class ThangsTabView extends CocoView
@dragged = true @dragged = true
@surface.camera.dragDisabled = true @surface.camera.dragDisabled = true
{stageX, stageY} = e.originalEvent {stageX, stageY} = e.originalEvent
wop = @surface.camera.screenToWorld x: stageX, y: stageY cap = @surface.camera.screenToCanvas x: stageX, y: stageY
wop = @surface.camera.canvasToWorld cap
wop.z = @selectedExtantThang.depth / 2 wop.z = @selectedExtantThang.depth / 2
@adjustThangPos @selectedExtantSprite, @selectedExtantThang, wop @adjustThangPos @selectedExtantSprite, @selectedExtantThang, wop
[w, h] = [@surface.camera.canvasWidth, @surface.camera.canvasHeight] [w, h] = [@surface.camera.canvasWidth, @surface.camera.canvasHeight]
@calculateMovement(stageX / w, stageY / h, w / h) sidebarWidths = ((if @$el.find(id).hasClass('hide') then 0 else (@$el.find(id).outerWidth() / @surface.camera.canvasScaleFactorX)) for id in ['#all-thangs', '#add-thangs-view'])
w -= sidebarWidth for sidebarWidth in sidebarWidths
cap.x -= sidebarWidths[0]
@calculateMovement(cap.x / w, cap.y / h, w / h)
onSpriteMouseUp: (e) -> onSpriteMouseUp: (e) ->
clearTimeout @backgroundAddClickTimeout clearTimeout @backgroundAddClickTimeout
@ -384,7 +388,7 @@ module.exports = class ThangsTabView extends CocoView
return unless @addThangSprite return unless @addThangSprite
wop = @surface.camera.screenToWorld x: e.x, y: e.y wop = @surface.camera.screenToWorld x: e.x, y: e.y
wop.z = 0.5 wop.z = 0.5
@adjustThangPos @addThangSprite, @addThangSprite.thang, wop # TODO: this and onSpriteDragged both conflictin' @adjustThangPos @addThangSprite, @addThangSprite.thang, wop
null null
onSurfaceMouseOver: (e) -> onSurfaceMouseOver: (e) ->

View file

@ -15,14 +15,15 @@ module.exports = class GameMenuModal extends ModalView
id: 'game-menu-modal' id: 'game-menu-modal'
instant: true instant: true
events:
'change input.select': 'onSelectionChanged'
'shown.bs.tab .nav-tabs a': 'onTabShown'
constructor: (options) -> constructor: (options) ->
super options super options
@options.showDevBits = me.isAdmin() or /https?:\/\/localhost/.test(window.location.href) @options.showDevBits = me.isAdmin() or /https?:\/\/localhost/.test(window.location.href)
@options.showInventory = @options.level.get('type', true) is 'hero' @options.showInventory = @options.level.get('type', true) is 'hero'
events:
'change input.select': 'onSelectionChanged'
getRenderData: (context={}) -> getRenderData: (context={}) ->
context = super(context) context = super(context)
context.showDevBits = @options.showDevBits context.showDevBits = @options.showDevBits
@ -36,6 +37,10 @@ module.exports = class GameMenuModal extends ModalView
(if @options.showInventory then @subviews.inventory_view else @subviews.choose_hero_view).$el.addClass 'active' (if @options.showInventory then @subviews.inventory_view else @subviews.choose_hero_view).$el.addClass 'active'
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'game-menu-open', volume: 1 Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'game-menu-open', volume: 1
onTabShown: ->
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'game-menu-tab-switch', volume: 1
onHidden: -> onHidden: ->
subview.onHidden?() for subviewKey, subview of @subviews subview.onHidden?() for subviewKey, subview of @subviews
me.patch() me.patch()
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'game-menu-close', volume: 1

View file

@ -13,7 +13,7 @@ module.exports = class NewModelModal extends ModalView
constructor: (options) -> constructor: (options) ->
super options super options
@model = options.model @modelClass = options.model
@modelLabel = options.modelLabel @modelLabel = options.modelLabel
@properties = options.properties @properties = options.properties
$('#name').ready @focusOnName $('#name').ready @focusOnName
@ -25,10 +25,10 @@ module.exports = class NewModelModal extends ModalView
c c
makeNewModel: -> makeNewModel: ->
model = new @model model = new @modelClass
name = @$el.find('#name').val() name = @$el.find('#name').val()
model.set('name', name) model.set('name', name)
if @model.schema().properties.permissions if model.schema().properties.permissions
model.set 'permissions', [{access: 'owner', target: me.id}] model.set 'permissions', [{access: 'owner', target: me.id}]
model.set(key, prop) for key, prop of @properties if @properties? model.set(key, prop) for key, prop of @properties if @properties?
model model

View file

@ -28,7 +28,7 @@ module.exports = class LevelGoalsView extends CocoView
@updatePlacement() @updatePlacement()
onNewGoalStates: (e) -> onNewGoalStates: (e) ->
firstRun = @previousGoalStatus? firstRun = not @previousGoalStatus?
@previousGoalStatus ?= {} @previousGoalStatus ?= {}
@$el.find('.goal-status').addClass 'secret' @$el.find('.goal-status').addClass 'secret'
classToShow = null classToShow = null
@ -63,8 +63,9 @@ module.exports = class LevelGoalsView extends CocoView
goals.push goal goals.push goal
if not firstRun and state.status is 'success' and @previousGoalStatus[goal.id] isnt 'success' if not firstRun and state.status is 'success' and @previousGoalStatus[goal.id] isnt 'success'
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'goal-success', volume: 1 Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'goal-success', volume: 1
else if not firstRun and state.status is 'incomplete' and @previousGoalStatus[goal.id] is 'success' else if not firstRun and state.status isnt 'success' and @previousGoalStatus[goal.id] is 'success'
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'goal-incomplete-again', volume: 1 Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'goal-incomplete-again', volume: 1
@previousGoalStatus[goal.id] = state.status
@$el.removeClass('secret') if goals.length > 0 @$el.removeClass('secret') if goals.length > 0
onSurfacePlaybackRestarted: -> onSurfacePlaybackRestarted: ->
@ -91,9 +92,20 @@ module.exports = class LevelGoalsView extends CocoView
sound = if expand then 'goals-expand' else 'goals-collapse' sound = if expand then 'goals-expand' else 'goals-collapse'
top = if expand then -10 else 26 - @$el.outerHeight() top = if expand then -10 else 26 - @$el.outerHeight()
@$el.css 'top', top @$el.css 'top', top
Backbone.Mediator.publish 'audio-player:play-sound', trigger: sound, volume: 1 if @expanded? if @soundTimeout
# Don't play the sound we were going to play after all; the transition has reversed.
clearTimeout @soundTimeout
@soundTimeout = null
else if @expanded?
# Play it when the transition ends, not when it begins.
@soundTimeout = _.delay @playToggleSound, 500, sound
@expanded = expand @expanded = expand
playToggleSound: (sound) =>
return if @destroyed
Backbone.Mediator.publish 'audio-player:play-sound', trigger: sound, volume: 1
@soundTimeout = null
onSetLetterbox: (e) -> onSetLetterbox: (e) ->
@$el.toggle not e.on @$el.toggle not e.on
@updatePlacement() @updatePlacement()

View file

@ -31,7 +31,7 @@ module.exports = class LevelLoadingView extends CocoView
loadingDetails.css 'top', -loadingDetails.outerHeight(true) loadingDetails.css 'top', -loadingDetails.outerHeight(true)
@$el.find('.left-wing').css left: '-100%', backgroundPosition: 'right -400px top 0' @$el.find('.left-wing').css left: '-100%', backgroundPosition: 'right -400px top 0'
@$el.find('.right-wing').css right: '-100%', backgroundPosition: 'left -400px top 0' @$el.find('.right-wing').css right: '-100%', backgroundPosition: 'left -400px top 0'
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'loading-view-unveil', volume: 1 Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'loading-view-unveil', volume: 0.5
_.delay @onUnveilEnded, duration * 1000 _.delay @onUnveilEnded, duration * 1000
onUnveilEnded: => onUnveilEnded: =>

View file

@ -341,6 +341,7 @@ module.exports = class LevelPlaybackView extends CocoView
Backbone.Mediator.publish 'level:set-playing', {playing: false} Backbone.Mediator.publish 'level:set-playing', {playing: false}
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'playback-scrub-start', volume: 0.5 Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'playback-scrub-start', volume: 0.5
stop: (event, ui) => stop: (event, ui) =>
return if @shouldIgnore() return if @shouldIgnore()
@actualProgress = ui.value / @sliderIncrements @actualProgress = ui.value / @sliderIncrements
@ -352,6 +353,7 @@ module.exports = class LevelPlaybackView extends CocoView
@$el.find('.scrubber-handle').effect('bounce', {times: 2}) @$el.find('.scrubber-handle').effect('bounce', {times: 2})
else else
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'playback-scrub-end', volume: 0.5 Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'playback-scrub-end', volume: 0.5
) )
getScrubRatio: -> getScrubRatio: ->

View file

@ -78,7 +78,8 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
trigger: 'hover' trigger: 'hover'
content: docFormatter.formatPopover() content: docFormatter.formatPopover()
container: @$el.parent() container: @$el.parent()
) ).on 'show.bs.popover', =>
Backbone.Mediator.publish 'audio-player:play-sound', trigger: "spell-tab-entry-open", volume: 0.75
onMouseEnterAvatar: (e) -> # Don't call super onMouseEnterAvatar: (e) -> # Don't call super
onMouseLeaveAvatar: (e) -> # Don't call super onMouseLeaveAvatar: (e) -> # Don't call super

View file

@ -44,11 +44,10 @@ module.exports = class SpellPaletteEntryView extends CocoView
content: @docFormatter.formatPopover() content: @docFormatter.formatPopover()
container: 'body' container: 'body'
template: @overridePopoverTemplate template: @overridePopoverTemplate
) ).on 'show.bs.popover', =>
window.element = @$el
@$el.on 'show.bs.popover', =>
Backbone.Mediator.publish 'tome:palette-hovered', thang: @thang, prop: @doc.name, entry: @ Backbone.Mediator.publish 'tome:palette-hovered', thang: @thang, prop: @doc.name, entry: @
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'spell-palette-entry-open', volume: 1 soundIndex = Math.floor(Math.random() * 4)
Backbone.Mediator.publish 'audio-player:play-sound', trigger: "spell-palette-entry-open-{soundIndex}", volume: 0.75
onMouseEnter: (e) -> onMouseEnter: (e) ->
# Make sure the doc has the updated Thang so it can regenerate its prop value # Make sure the doc has the updated Thang so it can regenerate its prop value
@ -65,6 +64,7 @@ module.exports = class SpellPaletteEntryView extends CocoView
@$el.add('.spell-palette-popover.popover').removeClass 'pinned' @$el.add('.spell-palette-popover.popover').removeClass 'pinned'
$('.spell-palette-popover.popover .close').remove() $('.spell-palette-popover.popover .close').remove()
@$el.popover 'hide' @$el.popover 'hide'
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'spell-palette-entry-unpin', volume: 1
else else
@popoverPinned = true @popoverPinned = true
@$el.popover 'show' @$el.popover 'show'

View file

@ -473,6 +473,35 @@ class WebGLDemoView extends RootView
# 20% CPU # 20% CPU
testGiantCanvas: ->
builder = new createjs.SpriteSheetBuilder()
# mess with these
builder.maxWidth = 4096
builder.maxHeight = 4096
scale = 3.9
duplicates = 100
frames = []
createClass = (frame) ->
class Stub
constructor: ->
sprite = new createjs.Sprite(sheet, frame)
sprite.stop()
return sprite
for name, klass of librarianLib
continue if name is 'Librarian_SideWalk_JSCC'
instance = new klass()
builder.addFrame(instance, instance.nominalBounds, scale) for i in _.range(duplicates)
librarianLib[name] = createClass(frames.length)
frames.push frames.length
sheet = builder.build()
$('body').attr('class', '').empty().css('background', 'white').append($(sheet._images))
for image, index in sheet._images
console.log "Sheet ##{index}: #{$(image).attr('width')}x#{$(image).attr('height')}"
afterRender: -> afterRender: ->
# @testMovieClipWithRasterizedSpriteChildren() # @testMovieClipWithRasterizedSpriteChildren()
@ -485,7 +514,8 @@ class WebGLDemoView extends RootView
# @testAnimateManyRasteredWaterfalls() # @testAnimateManyRasteredWaterfalls()
# @testManualMovieClipUpdating() # @testManualMovieClipUpdating()
# @testManyWaterfallsWithManualAnimation() # @testManyWaterfallsWithManualAnimation()
@testLibrarianHorde() # @testLibrarianHorde()
@testGiantCanvas()
module.exports = -> module.exports = ->
v = new WebGLDemoView() v = new WebGLDemoView()