echac ajotu shorcut à contexte

This commit is contained in:
mpelissi 2023-03-08 11:03:41 +01:00
parent 6edda69edd
commit 0d9cb773a8
3 changed files with 15 additions and 3 deletions

View File

@ -98,6 +98,8 @@ function init_variable(premier_appel){
message_fin = "> Sending data in progress ..."
envoie_termine = false
}
////////////////////////////////////////
@ -241,6 +243,7 @@ function init_data(){
imgs["checkbox"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Choices/empty_checkbox.png')
imgs["marie"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/User_study/main/Autres/marie.png')
imgs["clavier_vues"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/clavier_vues.png')
imgs["clavier_enter"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/clavier_enter.png')
boutons = {}
boutons["reinitialiser"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_reinitialiser.png')
boutons["valider"] = new_image('https://raw.githubusercontent.com/PelissierCombescure/BVS-study/main/graphics/Boutons/bouton_valider.png')
@ -270,6 +273,11 @@ function init_data(){
function animate() {
// Temps à chaque animate
time_animate = new Date().getTime()
// shorcut
w_Bshortcut = 122
h_Bshortcut = 40
x_Bshortcut = 10
y_Bshortcut = window.innerHeight-h_Bshortcut-10
////////////////////////////////////////////////////////////////////////////////
if (page_contexte){
//console.log("boucle contexte")
@ -279,6 +287,8 @@ function animate() {
premier_tour_page_contexte = false
}
traitement_contexte()
}
////////////////////////////////////////////////////////////////////////////////
// page inscription
@ -292,6 +302,7 @@ function animate() {
afficher_champs_inscription()
premier_tour_page_inscription=false}
traitement_inscription()
}
////////////////////////////////////////////////////////////////////////////////
if (page_explication){

View File

@ -489,7 +489,7 @@ function action_bouton_raz(){
function traitement_bouton(){
// raccourcis bouton et fleche
shortcuts(xyMouseMove, imgs['clavier_vues'], window.innerWidth/2 -(imgs['clavier_vues'].width/2), window.innerHeight/2 -(imgs['clavier_vues'].height/2), imgs['clavier_vues'].width, imgs['clavier_vues'].height, boutons['raccourcis'], 10, window.innerHeight-0.5*h_bouton-10, 0.5*w_bouton, 0.5*h_bouton)
shortcuts(xyMouseMove, imgs['clavier_vues'], window.innerWidth/2 -(imgs['clavier_vues'].width/2), window.innerHeight/2 -(imgs['clavier_vues'].height/2), imgs['clavier_vues'].width, imgs['clavier_vues'].height, boutons['raccourcis'], x_Bshortcut, y_Bshortcut, w_Bshortcut, h_Bshortcut)
// si on survol, on a les contours qui apparaissent
survol_bouton()
// si on click

View File

@ -17,12 +17,13 @@ function affichage_texte_contexte(){
function action_bouton_commencer_contexte(){
page_contexte = false
//page_inscription = true
page_vues = true
page_inscription = true
//page_vues = true
interactions.push({"time": new Date().getTime(), "type": "Fin contexte - Début inscription"})
}
function traitement_contexte(){
//shortcuts(xyMouseMove, imgs['clavier_enter'], window.innerWidth/2 -(imgs['clavier_enter'].width/2), window.innerHeight/2 -(imgs['clavier_enter'].height/2), imgs['clavier_enter'].width, imgs['clavier_enter'].height, boutons['raccourcis'], x_Bshortcut, y_Bshortcut, w_Bshortcut, h_Bshortcut)
affichage_texte_contexte()
//clignotement_rectangle(1000, 10,10,100,100, "rgb(255,0,0)")
afficher_bouton_commencer() // meme bouton que la page inscription