page analyse preque ok
This commit is contained in:
parent
417055a1f6
commit
d9a863489f
|
@ -43,12 +43,12 @@ function init_variable(premier_appel){
|
|||
indice_mesh = 0 // indice du premier mesh à visionner
|
||||
mesh_courant = "nope" // nom des mesh
|
||||
// nombre de mesh a visionner AU TOTAL
|
||||
nb_mesh = 4 //3
|
||||
nb_mesh = 2 //3
|
||||
// random nom mesh
|
||||
obj_file = shuffle(['dragon_update_user_study_normed.obj', 'camel_update_user_study_normed.obj', 'gorgoile_update_user_study_centered_normed.obj', 'horse_update_user_study_normed.obj'])
|
||||
|
||||
// nb analyse demandé
|
||||
nb_analyse_demande = 3
|
||||
nb_analyse_demande = 2
|
||||
list_idx_tache =[]
|
||||
for (let p=0; p<nb_mesh; p++){list_idx_tache.push(p+1)}
|
||||
list_idx_tache = shuffle(list_idx_tache)
|
||||
|
@ -89,8 +89,8 @@ function init_variable(premier_appel){
|
|||
page_explication = false
|
||||
page_warning = false
|
||||
page_explication_bis = false
|
||||
page_vues = false // false
|
||||
page_explication_analyse = true
|
||||
page_vues = true // false
|
||||
page_explication_analyse = false
|
||||
page_analyse = false
|
||||
// cas raz : on recommence juste la partie vues
|
||||
} else {
|
||||
|
@ -113,6 +113,7 @@ function init_variable(premier_appel){
|
|||
premier_tour_page_explications = true
|
||||
premier_tour_page_warning = true
|
||||
premier_tour_page_vues = true
|
||||
premier_tour_page_explication_analyse = true
|
||||
premier_tour_page_analyse = true
|
||||
|
||||
// message de fin
|
||||
|
@ -285,6 +286,7 @@ function init_data(){
|
|||
boutons["choix_pose"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_pose.png')
|
||||
boutons["retirer"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_retirer.png')
|
||||
boutons["commencer"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_commencer.png')
|
||||
boutons["commencer_petit"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_commencer_petit.png')
|
||||
boutons["commencer_choix"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_commencer_choix.png')
|
||||
boutons["commencer_tuto"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_commencer_tuto.png')
|
||||
boutons["commencer_inscription"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_commencer_inscription.png')
|
||||
|
@ -461,11 +463,11 @@ function animate() {
|
|||
// on enlève les touches du clavier associé à la page vues
|
||||
document.removeEventListener("keydown", action_clavier_vues)
|
||||
// inti clavier
|
||||
if(premier_tour_page_analyse){
|
||||
interactions.push({"time": new Date().getTime(), "type": "Début analyse n°1"})
|
||||
init_clavier_analyse()
|
||||
if(premier_tour_page_explication_analyse){
|
||||
interactions.push({"time": new Date().getTime(), "type": "Début explication analyse"})
|
||||
init_clavier_explication_analyse()
|
||||
init_textes_explication_analyses()
|
||||
premier_tour_page_analyse = false}
|
||||
premier_tour_page_explication_analyse = false}
|
||||
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
||||
traitement_explication_analyses()
|
||||
|
@ -475,14 +477,16 @@ function animate() {
|
|||
// page analyse
|
||||
if (page_analyse){
|
||||
console.log("boucle analyse")
|
||||
// // inti clavier
|
||||
// if(premier_tour_page_analyse){
|
||||
// interactions.push({"time": new Date().getTime(), "type": "Début analyse n°1"})
|
||||
// init_clavier_analyse()
|
||||
// premier_tour_page_analyse = false}
|
||||
|
||||
//ctx.clearRect(0, 0, canvas.width, canvas.height)
|
||||
// on enlève les touches du clavier associé à la page vues
|
||||
document.removeEventListener("keydown", action_clavier_explication_analyse)
|
||||
// inti clavier
|
||||
if(premier_tour_page_analyse){
|
||||
interactions.push({"time": new Date().getTime(), "type": "Début analyse n°1"})
|
||||
init_clavier_analyse()
|
||||
init_variable_analyse()
|
||||
premier_tour_page_analyse = false}
|
||||
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
||||
traitement_fin()
|
||||
|
||||
}
|
||||
|
|
|
@ -1,56 +1,54 @@
|
|||
// liste des checkbox clické pour chaque recap
|
||||
checkbox_clicked_courant = {idx_checkbox:[], mots:[]}
|
||||
// nuemro init de l'analyse
|
||||
num_analyse = 0
|
||||
idx_tache = 0 // ATTENTION ça commence à 1
|
||||
|
||||
h_bouton_analyse = 0.1*window.innerHeight
|
||||
|
||||
|
||||
// Variable
|
||||
function init_variable_analyse(){
|
||||
w_checkbox = 30
|
||||
h_checkbox = 30
|
||||
y_checkbox = window.innerHeight*0.75
|
||||
// liste des checkbox clické pour chaque recap
|
||||
checkbox_clicked_courant = {}
|
||||
for (let p=0; p<nb_choix_demande; p++){
|
||||
checkbox_clicked_courant["Viewpoint_"+(p+1)] = {idx_checkbox:[], mots:[]}
|
||||
}
|
||||
|
||||
// Analayse des choix avec les checkboxs
|
||||
keywords = ["1. De face", "2. De profil", "3. Debout", "4. Eyes contact", "5. toto"]
|
||||
|
||||
w_bouton = 50
|
||||
h_bouton = 50
|
||||
w_valider = w_bouton*1.2
|
||||
h_valider = h_bouton*1.2
|
||||
x_valider = (window.innerWidth/2)-w_valider/2
|
||||
y_valider = window.innerHeight-(h_valider*1.5)
|
||||
y_recap = 0.2*window.innerHeight
|
||||
taille_texte_explication = 0.01*window.innerWidth
|
||||
x_recap_init = (window.innerWidth - nb_choix_demande*(H_3D/2))/(nb_choix_demande+1)
|
||||
|
||||
// checkbox
|
||||
w_checkbox = 20
|
||||
h_checkbox = 20
|
||||
y_checkbox_init = y_recap + H_3D/2 + h_checkbox
|
||||
}
|
||||
|
||||
|
||||
function affichage_legende(pos){
|
||||
x_image = dx + (ecart_analyse+ W_3D/2.5)*pos
|
||||
x_image = (pos+1)*x_recap_init + pos*(H_3D/2)
|
||||
ctx.strokeStyle = "rgb(255, 255, 255)"; ctx.fillStyle = "rgb(255, 255, 255)"
|
||||
if (pos==0){print_text(handle_text("Best viewpoint:", x_image, 220, "20pt Courier", longueur_max_recap))}
|
||||
if (pos==1){print_text(handle_text("2nd viewpoint:", x_image, 220, "20pt Courier", longueur_max_recap))}
|
||||
if (pos==2){print_text(handle_text("3rd viewpoint:", x_image, 220, "20pt Courier", longueur_max_recap))}
|
||||
if (pos==0){print_text(handle_text("Best viewpoint:", x_image, y_recap-10, taille_texte_explication+"pt Courier", longueur_max_recap))}
|
||||
if (pos==1){print_text(handle_text("2nd viewpoint:", x_image, y_recap-10, taille_texte_explication+"pt Courier", longueur_max_recap))}
|
||||
if (pos==2){print_text(handle_text("3rd viewpoint:", x_image, y_recap-10, taille_texte_explication+"pt Courier", longueur_max_recap))}
|
||||
}
|
||||
|
||||
function affichage_texte(){
|
||||
w_bouton_commencer = scale_bouton_commencer*boutons["commencer"].width
|
||||
h_bouton_commencer = scale_bouton_commencer*boutons["commencer"].height
|
||||
// Texte
|
||||
draw_rectangle(0,0,canvas.width, canvas.height, "rgb(3, 26, 33)", 1) // ou + clair 4, 38, 48
|
||||
ctx.strokeStyle = "rgb(255, 255, 255)" // Pour que le contour soit rouge
|
||||
ctx.fillStyle = "rgb(255, 255, 255)" // Pour que l'intérieur soit bleu
|
||||
ctx.font = "bold 32pt Courier";
|
||||
ctx.fillText("Analysis about your choices", (window.innerWidth/3), 70)
|
||||
affichage_titre("Analysis your choices", (0.018*window.innerWidth)+"pt Courier", "#EF476F", yt = 0.1*window.innerHeight)
|
||||
}
|
||||
|
||||
// idx_tache est la num de la tache à aller chercher dans all_ctxMins
|
||||
function affichage_analyse(idx_tache){
|
||||
ecart_analyse = 50
|
||||
dx = (window.innerWidth - canvasMins.length*(W_3D/2.5) - (canvasMins.length-1)*(ecart_analyse))*0.5
|
||||
canvasMins = all_canvasMins['tache_N'+list_idx_tache[idx_tache]][1]
|
||||
for (let i=0; i<canvasMins.length; i++){
|
||||
for (let i=0; i<nb_choix_demande; i++){
|
||||
affichage_legende(i)
|
||||
ctx.drawImage(canvasMins[i], dx + (ecart_analyse+ W_3D/2.5)*i, 250, H_3D/2, H_3D/2)
|
||||
//draw_contour(dx + (ecart_analyse+ W_3D/2.5)*i, 250, W_3D/2.5, H_3D/2.5, "rgb(255,0,0)")
|
||||
x_recap = (i+1)*x_recap_init + i*(H_3D/2)
|
||||
ctx.drawImage(canvasMins[i], x_recap, y_recap, H_3D/2, H_3D/2)
|
||||
//draw_contour(dx + (ecart_analyse+ W_3D/2.5)*i, 250, H_3D/2.5, H_3D/2.5, "rgb(255,0,0)")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,27 +71,46 @@ function progress_bar_analyse(N_analyse, N_analyse_total){
|
|||
///////////////////////////////////////////////////////////////
|
||||
///////////////////// Bouton
|
||||
|
||||
function affichage_bouton_valider_analyse(){
|
||||
function affichage_bouton_valider_analyse(m){
|
||||
ratio_bouton_analyse = h_bouton_analyse/boutons["valider"].height
|
||||
w_bouton_analyse = ratio_bouton_analyse*boutons["valider"].width
|
||||
h_bouton_analyse = h_bouton_analyse
|
||||
x_bouton_analyse = (window.innerWidth/2) - w_bouton_analyse/2
|
||||
y_bouton_analyse = window.innerHeight - h_bouton_analyse - 20
|
||||
// si au moins un mot est coché
|
||||
if (checkbox_clicked_courant.idx_checkbox.length>0){
|
||||
if (condition_valider()){
|
||||
// affichage bouton valider
|
||||
ctx.drawImage(boutons["valider"], x_valider, y_valider, w_valider, h_valider)
|
||||
if (m == "en_cours")
|
||||
{ctx.drawImage(boutons["valider"], x_bouton_analyse, y_bouton_analyse, w_bouton_analyse, h_bouton_analyse)}
|
||||
else{ctx.drawImage(boutons["envoie_data"], x_bouton_analyse, y_bouton_analyse, w_bouton_analyse, h_bouton_analyse)}
|
||||
// survol
|
||||
if(is_inside(xyMouseMove, x_valider, y_valider, w_valider, h_valider)){
|
||||
draw_rectangle(x_valider, y_valider, w_valider, h_valider, "rgb(200, 200, 200)", 0.6)
|
||||
if(is_inside(xyMouseMove, x_bouton_analyse, y_bouton_analyse, w_bouton_analyse, h_bouton_analyse)){
|
||||
draw_rectangle(x_bouton_analyse, y_bouton_analyse, w_bouton_analyse, h_bouton_analyse, "rgb(200, 200, 200)", 0.6)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function condition_valider(){
|
||||
for(let k=0; k<nb_choix_demande;k++){
|
||||
if (checkbox_clicked_courant['Viewpoint_'+(k+1)].idx_checkbox.length == 0){
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
function action_bouton_valider_analyse(){
|
||||
interactions.push({"time": new Date().getTime(), "type": "Bouton valider analyse."})
|
||||
// si au moins un mot est coché et qu'il reste des analyse à faire
|
||||
if (checkbox_clicked_courant.idx_checkbox.length>0){
|
||||
if (condition_valider()){
|
||||
// sauvegarde des checkbox clikée et les mesh
|
||||
checkbox_clicked['analyse_N'+(num_analyse+1)] = {"mesh" : choix["tache_N"+list_idx_tache[idx_tache]].mesh ,"idx" : checkbox_clicked_courant.idx_checkbox, "mots": checkbox_clicked_courant.mots}
|
||||
checkbox_clicked['Analyse_N'+(num_analyse+1)] = {"mesh" : choix["tache_N"+list_idx_tache[idx_tache]].mesh ,"Checkbox" : checkbox_clicked_courant}
|
||||
//RAZ pour la prochaine analyse
|
||||
checkbox_clicked_courant = {idx_checkbox:[], mots:[]}
|
||||
checkbox_clicked_courant = {}
|
||||
for (let p=0; p<nb_choix_demande; p++){
|
||||
checkbox_clicked_courant["Viewpoint_"+(p+1)] = {idx_checkbox:[], mots:[]}
|
||||
}
|
||||
// analyse suivant
|
||||
num_analyse = num_analyse + 1
|
||||
// indice mesh da l'analyse suivante
|
||||
|
@ -107,63 +124,52 @@ function action_bouton_valider_analyse(){
|
|||
///////////////////////////////////////////////////////////////
|
||||
///////////////////// Checkbox
|
||||
|
||||
function traitement_empty_checkbox(num_analyse){
|
||||
function traitement_empty_checkbox(){
|
||||
for(let p=0; p<nb_choix_demande; p++){
|
||||
for (let i = 0 ; i < keywords.length; i++){
|
||||
// checkbox vide
|
||||
x_checkbox = 200 + 300*(i)
|
||||
x_checkbox = (p+1)*x_recap_init + p*(H_3D/2)
|
||||
y_checkbox = y_checkbox_init + (h_checkbox* 1.5)*i
|
||||
ctx.drawImage(imgs["checkbox"], x_checkbox , y_checkbox, w_checkbox, h_checkbox)
|
||||
// Texte
|
||||
print_text(handle_text(keywords[i], x_checkbox + w_checkbox + 30, y_checkbox + 20, "14pt Courier", longueur_max_error))
|
||||
print_text(handle_text(keywords[i], x_checkbox + w_checkbox + 30, y_checkbox + 20, taille_texte_explication+"pt Courier", longueur_max_error))
|
||||
// survol
|
||||
if (is_inside(xyMouseMove, x_checkbox, y_checkbox, w_checkbox, h_checkbox)){
|
||||
draw_rectangle(x_checkbox, y_checkbox, w_checkbox, h_checkbox, "rgb(0, 255, 0)", alpha_survol)
|
||||
}
|
||||
// clicked
|
||||
if (clicked && is_inside(xyMouseMove, x_checkbox, y_checkbox, w_checkbox, h_checkbox)){
|
||||
// s'il n'y a pas deja un check dessus
|
||||
// if (checkbox_clicked_courant.idx_checkbox.indexOf(i) == -1){
|
||||
// checkbox_clicked_courant.idx_checkbox.push(i)
|
||||
// checkbox_clicked_courant.mots.push(keywords[i])
|
||||
// interactions.push({"time": new Date().getTime(), "type": "ajout check sur : analyse n°"+(num_analyse+1)+", mot "+keywords[i]})
|
||||
// console.log('ajout '+keywords[i])
|
||||
// }
|
||||
|
||||
// else{
|
||||
// position_i = checkbox_clicked_courant.idx_checkbox.indexOf(i)
|
||||
// checkbox_clicked_courant.idx_checkbox.splice(position_i,1)
|
||||
// checkbox_clicked_courant.mots.splice(position_i,1)
|
||||
// console.log('retrait '+keywords[i])
|
||||
// interactions.push({"time": new Date().getTime(), "type": "retrait check sur : analyse n°"+(num_analyse+1)+", mot "+keywords[i]})
|
||||
// }
|
||||
check_ou_decheck(i)
|
||||
check_ou_decheck(i,p)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function check_ou_decheck(pos){
|
||||
function check_ou_decheck(i_mot, p_vue){
|
||||
//s'il n'y a pas deja un check dessus
|
||||
if (checkbox_clicked_courant.idx_checkbox.indexOf(pos) == -1){
|
||||
checkbox_clicked_courant.idx_checkbox.push(pos)
|
||||
checkbox_clicked_courant.mots.push(keywords[pos])
|
||||
interactions.push({"time": new Date().getTime(), "type": "ajout check sur : analyse n°"+(num_analyse+1)+", mot "+keywords[pos]})
|
||||
console.log('ajout '+keywords[pos])
|
||||
if (checkbox_clicked_courant["Viewpoint_"+(p_vue+1)].idx_checkbox.indexOf(i_mot) == -1){
|
||||
checkbox_clicked_courant["Viewpoint_"+(p_vue+1)].idx_checkbox.push(i_mot)
|
||||
checkbox_clicked_courant["Viewpoint_"+(p_vue+1)].mots.push(keywords[i_mot])
|
||||
interactions.push({"time": new Date().getTime(), "type": "ajout check sur : analyse n°"+(num_analyse+1)+", mot "+keywords[i_mot]+" à "+(p_vue+1)+"e vues"})
|
||||
console.log("ajout "+keywords[i_mot]+" à "+(p_vue+1)+"e vues")
|
||||
}
|
||||
|
||||
else{
|
||||
position_i = checkbox_clicked_courant.idx_checkbox.indexOf(pos)
|
||||
checkbox_clicked_courant.idx_checkbox.splice(position_i,1)
|
||||
checkbox_clicked_courant.mots.splice(position_i,1)
|
||||
console.log('retrait '+keywords[pos])
|
||||
interactions.push({"time": new Date().getTime(), "type": "retrait check sur : analyse n°"+(num_analyse+1)+", mot "+keywords[pos]})
|
||||
position_i = checkbox_clicked_courant["Viewpoint_"+(p_vue+1)].idx_checkbox.indexOf(i_mot)
|
||||
checkbox_clicked_courant["Viewpoint_"+(p_vue+1)].idx_checkbox.splice(position_i,1)
|
||||
checkbox_clicked_courant["Viewpoint_"+(p_vue+1)].mots.splice(position_i,1)
|
||||
console.log("retrait "+keywords[i_mot]+" à "+(p_vue+1)+"e vues")
|
||||
interactions.push({"time": new Date().getTime(), "type": "retrait check sur : analyse n°"+(num_analyse+1)+", mot "+keywords[i_mot]+" à "+(p_vue+1)+"e vues"})
|
||||
}
|
||||
}
|
||||
|
||||
function draw_check(){
|
||||
idx_check = checkbox_clicked_courant.idx_checkbox
|
||||
function draw_check(p_vue){
|
||||
idx_check = checkbox_clicked_courant["Viewpoint_"+(p_vue+1)].idx_checkbox
|
||||
// pour chacune de ces checkbox cliquée on affiche un check
|
||||
for (let i = 0 ; i < idx_check.length; i++){
|
||||
pos = idx_check[i]
|
||||
x_checkbox = 200 + 300*(pos)
|
||||
x_checkbox = (p_vue+1)*x_recap_init + p_vue*(H_3D/2)
|
||||
y_checkbox = y_checkbox_init + (h_checkbox* 1.5)*pos
|
||||
ctx.drawImage(imgs["check"], x_checkbox-5 , y_checkbox-5, w_checkbox+10, h_checkbox+10)
|
||||
}
|
||||
}
|
||||
|
@ -175,17 +181,21 @@ function traitement_fin(){
|
|||
// affiche les textes de la page sauf les ceheckbox
|
||||
affichage_texte()
|
||||
// afficher les checkbox et gerer les click ou declick
|
||||
traitement_empty_checkbox(num_analyse)
|
||||
traitement_empty_checkbox()
|
||||
// affiche les check vert en fonction de ce qu'il y a dans checkbox_clicked_courant
|
||||
draw_check()
|
||||
for (let p =0; p<nb_choix_demande;p++){draw_check(p)}
|
||||
// affiche les nb_demande_choix images recap
|
||||
affichage_analyse(idx_tache)
|
||||
// affiche progress bar
|
||||
progress_bar_analyse(num_analyse, nb_analyse_demande)
|
||||
if (num_analyse < nb_analyse_demande-1){
|
||||
// bouton valider
|
||||
affichage_bouton_valider_analyse()
|
||||
affichage_bouton_valider_analyse("en_cours")}
|
||||
else{
|
||||
affichage_bouton_valider_analyse("fin")
|
||||
}
|
||||
// action si bouton valider
|
||||
if (clicked && is_inside(xyMouseMove, x_valider, y_valider, w_valider, h_valider)){
|
||||
if (clicked && is_inside(xyMouseMove, x_bouton_analyse, y_bouton_analyse, w_bouton_analyse, h_bouton_analyse)){
|
||||
action_bouton_valider_analyse()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,9 @@ function action_clavier_vues(event){
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function action_clavier_analyse(event){
|
||||
switch (event.key){
|
||||
// selectionner pose
|
||||
|
@ -91,21 +94,21 @@ function action_clavier_analyse(event){
|
|||
case 'Enter':
|
||||
action_bouton_valider_analyse()
|
||||
break;
|
||||
case '1':
|
||||
check_ou_decheck(0)
|
||||
break;
|
||||
case '2':
|
||||
check_ou_decheck(1)
|
||||
break;
|
||||
case '3':
|
||||
check_ou_decheck(2)
|
||||
break;
|
||||
case '4':
|
||||
check_ou_decheck(3)
|
||||
break;
|
||||
case '5':
|
||||
check_ou_decheck(4)
|
||||
break;
|
||||
// case '1':
|
||||
// check_ou_decheck(0)
|
||||
// break;
|
||||
// case '2':
|
||||
// check_ou_decheck(1)
|
||||
// break;
|
||||
// case '3':
|
||||
// check_ou_decheck(2)
|
||||
// break;
|
||||
// case '4':
|
||||
// check_ou_decheck(3)
|
||||
// break;
|
||||
// case '5':
|
||||
// check_ou_decheck(4)
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,6 +130,11 @@ function init_clavier_vues(){
|
|||
document.addEventListener("keydown", action_clavier_vues)
|
||||
}
|
||||
|
||||
function init_clavier_explication_analyse(){
|
||||
document.addEventListener("keydown", action_clavier_explication_analyse)
|
||||
}
|
||||
|
||||
|
||||
function init_clavier_analyse(){
|
||||
document.addEventListener("keydown", action_clavier_analyse)
|
||||
}
|
|
@ -19,7 +19,7 @@ function action_bouton_commencer_explication_analyse(){
|
|||
page_explication_analyse = false
|
||||
page_analyse = true
|
||||
//page_vues = true
|
||||
interactions.push({"time": new Date().getTime(), "type": "Fin warning"})
|
||||
interactions.push({"time": new Date().getTime(), "type": "Fin explication analyse"})
|
||||
}
|
||||
|
||||
function afficher_bouton_commencer_explication_analyse(){
|
||||
|
@ -28,7 +28,7 @@ function afficher_bouton_commencer_explication_analyse(){
|
|||
x_bouton_commencer = x_bouton_suivant
|
||||
y_bouton_commencer = y_bouton_suivant
|
||||
// Bouton commencer
|
||||
ctx.drawImage(boutons["commencer"], x_bouton_commencer, y_bouton_commencer , w_bouton_commencer, h_bouton_commencer)
|
||||
ctx.drawImage(boutons["commencer_petit"], x_bouton_commencer, y_bouton_commencer , w_bouton_commencer, h_bouton_commencer)
|
||||
|
||||
// Survol
|
||||
if(xyMouseMove.x >= x_bouton_commencer && xyMouseMove.x <= x_bouton_commencer + w_bouton_commencer && xyMouseMove.y > y_bouton_commencer && xyMouseMove.y < y_bouton_commencer + h_bouton_commencer){
|
||||
|
@ -133,6 +133,26 @@ function traitement_explication_analyses(){
|
|||
}
|
||||
|
||||
|
||||
|
||||
function action_clavier_explication_analyse(event){
|
||||
switch (event.key){
|
||||
// selectionner pose
|
||||
// valider
|
||||
case 'Enter':
|
||||
if (num_explication_analyse < (explications_analyse_page_1.length)-1){
|
||||
action_bouton_suivant_explication_analyse()}
|
||||
else{
|
||||
action_bouton_commencer_explication_analyse()
|
||||
}
|
||||
break;
|
||||
case 'Backspace':
|
||||
if(num_explication_analyse > 0){
|
||||
action_bouton_avant_explication_analyse()
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
///// Textes
|
||||
|
||||
|
|
Loading…
Reference in New Issue