Bugfix : focus de l'icone d'aide et message du jumeau réel

This commit is contained in:
Philippe Roy 2023-01-05 00:40:14 +01:00
parent 45d54cacac
commit 1f7ff72203
3 changed files with 17 additions and 7 deletions

View File

@ -197,8 +197,11 @@ def cmd_hl(cont):
"About-cmd": "A propos"}
scene.objects['Cmd-text']['modal']= False
scene.objects['Cmd-text']['Text']= text_hl[obj.name]
print (obj.name)
if scene.objects['Doc']['page_chap']== "" and obj.name =="Doc-cmd-colbox" :
scene.objects['Cmd-text']['Text']= "Chargement de la documentation ..."
if scene.objects['Doc']['page_chap']!= "" and obj.name =="Doc-cmd-colbox" :
bpy.context.view_layer.update() # Bug de mise à jour
scene.objects['Cmd-text'].setVisible(True,False)
# Désactivation
@ -256,8 +259,6 @@ def cmd_click(cont):
# Aide
if obj.name=="Doc-cmd-colbox" :
scene.objects['Doc-cmd-Hl'].setVisible(False,False)
scene.objects['Doc-cmd'].setVisible(True,False)
twin_doc.open()
###############################################################################

View File

@ -221,8 +221,8 @@ def init():
scene.objects['Doc']['page_chap'] = "general"
# UI : information
scene.objects['Cmd-text']['Text']= ""
scene.objects['Cmd-text'].setVisible(False,False)
# scene.objects['Cmd-text']['Text']= ""
# scene.objects['Cmd-text'].setVisible(False,False)
##
# Ouvrir la documentation
@ -236,10 +236,16 @@ def open():
# Placer la tablette
scene.objects['System']['manip_mode']=8 # Fenêtre modale Documentation
scene.objects['Doc-cmd-Hl'].setVisible(False,False)
scene.objects['Doc-cmd'].setVisible(True,False)
scene.objects['Cmd-text'].setVisible(False,False)
scene.objects['Twins-icon'].setVisible(False,True)
scene.objects['Twins-text'].setVisible(False,True)
bpy.context.view_layer.update() # Bug de mise à jour
scene.active_camera = scene.objects["Camera-Doc"]
# scene.removeOverlayCollection(bpy.data.collections['Hud']) # Crash de UPBGE sur la supression de l'Overlay
scene.objects['Twins-icon'].setVisible(False,True) # Crash de UPBGE sur la supression de l'Overlay
scene.objects['Twins-text'].setVisible(False,True) # Crash de UPBGE sur la supression de l'Overlay
# scene.objects['Twins-icon'].setVisible(False,True) # Crash de UPBGE sur la supression de l'Overlay
# scene.objects['Twins-text'].setVisible(False,True) # Crash de UPBGE sur la supression de l'Overlay
scene.objects['Doc_close'].color= color_doc_fct
scene.objects['Doc'].setVisible(True,True)
if scene.objects['Doc']['static']:
@ -297,7 +303,7 @@ def close(cont):
# scene.addOverlayCollection(scene.cameras['Camera-Hud'], bpy.data.collections['Hud']) # Crash de UPBGE sur la supression de l'Overlay
scene.objects['Twins-icon'].setVisible(True,True) # Crash de UPBGE sur la supression de l'Overlay
scene.objects['Twins-text'].setVisible(True,True) # Crash de UPBGE sur la supression de l'Overlay
scene.objects['Cmd-text']['Text']= " " # Redraw pour afficher scene.objects['Twins-icon'] et scene.objects['Twins-text']
bpy.context.view_layer.update() # Bug de mise à jour
chap=("general", "system", "python")
for page in chap:
scene.objects["Doc_chap-"+page].setVisible(False,True)
@ -312,6 +318,9 @@ def close(cont):
scene.objects["Doc_text-"+card].setVisible(False,True)
else:
text_dynamic_hide()
# scene.objects['Twins-icon'].setVisible(True,True) # Crash de UPBGE sur la supression de l'Overlay
# scene.objects['Twins-text'].setVisible(True,True) # Crash de UPBGE sur la supression de l'Overlay
# scene.objects['Cmd-text']['Text']= " " # Redraw pour afficher scene.objects['Twins-icon'] et scene.objects['Twins-text']
##
# Highlight

Binary file not shown.