diff --git a/ropy-07.blend b/ropy-07.blend index 9baa195..7acc206 100644 Binary files a/ropy-07.blend and b/ropy-07.blend differ diff --git a/rp.py b/rp.py index 5f5e544..2f4f49c 100644 --- a/rp.py +++ b/rp.py @@ -307,7 +307,6 @@ def cmd_init(): scene.objects['Doc-cmd-Hl'].setVisible(False,False) scene.objects['ResetView-Hl'].setVisible(False,False) scene.objects['About-cmd-Hl'].setVisible(False,False) - scene.objects['About'].setVisible(False,True) # UI : Sounds # Read config (sound : data/config/sound -> [0][1].text) @@ -463,7 +462,8 @@ def cmd_click (cont): # 0 : rien (par défaut) # 1 : Pan avec Shift # 2 : Zoom avec Ctrl -# 9 : Fenêtre modal +# 8 : Fenêtre Documentation +# 9 : Fenêtre About ## def mode(cont): @@ -780,19 +780,22 @@ def mouse_down(): ## def tablet_open (): - scene.objects['Terrain']['manip_mode']=9 # Fenêtre modale + scene.objects['Terrain']['manip_mode']=8 # Fenêtre modale Aide manip_reset() # Overlay - # scene.objects['Points'].setVisible(False,True) # scene.objects['Points-Step-text'].setVisible(False,True) # scene.objects['Points-Level-text'].setVisible(False,True) # scene.objects['Points-Nbligne-text'].setVisible(False,True) # scene.objects['Level'].setVisible(False,True) - # scene.removeOverlayCollection(bpy.data.collections['Hud']) - # scene.active_camera = scene.objects["Camera-Hud"] + scene.removeOverlayCollection(bpy.data.collections['Hud']) + scene.objects['Points'].setVisible(False,True) + scene.objects['Commands'].setVisible(False,True) + scene.active_camera = scene.objects["Camera-Hud"] + scene.objects['Camera'].setVisible(False,True) + # scene.objects['Sun'].setVisible(False,False) # scene.objects['Book-cmd'].setVisible(False,False) # scene.objects['Book-cmd'].suspendPhysics() @@ -802,7 +805,7 @@ def tablet_open (): # scene.objects['Construc-Hl'].setVisible(False,False) # scene.objects['Book-cmd-underlay'].setVisible(True,False) - # Initialisation de la tablette + # Ouvrir la tablette rp_doc.open() ## @@ -813,28 +816,39 @@ def tablet_close (): # Fermeture de la tablette rp_doc.close() - scene.objects['Terrain']['manip_mode']=0 # Fenêtre modale + scene.objects['Terrain']['manip_mode']=0 # Enlever la fenêtre modale # Overlay - # scene.objects['Points'].setVisible(True,True) + scene.objects['Points'].setVisible(True,True) + scene.objects['Commands'].setVisible(True,True) + scene.objects['Camera'].setVisible(True,True) + scene.active_camera = scene.objects["Camera"] + scene.addOverlayCollection(scene.cameras['Camera-Hud'], bpy.data.collections['Hud']) - # scene.objects['Points-Step-text'].setVisible(True,True) - # scene.objects['Points-Level-text'].setVisible(True,True) - # scene.objects['Points-Nbligne-text'].setVisible(True,True) - # scene.objects['Level'].setVisible(True,True) - - # scene.active_camera = scene.objects["Camera"] - # scene.addOverlayCollection(scene.cameras['Camera-Hud'], bpy.data.collections['Hud']) - # scene.objects['Sun'].setVisible(True,False) - # scene.objects['Book-cmd'].setVisible(True,False) - # scene.objects['Book-cmd']. restorePhysics() - # scene.objects['Construc'].setVisible(True,False) - # scene.objects['Construc']. restorePhysics() - # scene.objects['Book-cmd-underlay'].setVisible(False,False) - # scene.objects['Construc-underlay'].setVisible(False,False) + # UI : Commands + scene.objects['Run-Hl'].setVisible(False,False) + scene.objects['Pause'].setVisible(False,False) + scene.objects['Pause'].suspendPhysics() + scene.objects['Pause-Hl'].setVisible(False,False) + scene.objects['Stop'].setVisible(False,False) + scene.objects['Stop'].suspendPhysics() + scene.objects['Stop-Hl'].setVisible(False,False) + scene.objects['Distance-Hl'].setVisible(False,False) + scene.objects['Doc-cmd-Hl'].setVisible(False,False) + scene.objects['ResetView-Hl'].setVisible(False,False) + scene.objects['About-cmd-Hl'].setVisible(False,False) + + # UI : Sounds + # Read config (sound : data/config/sound -> [0][1].text) + if rp_config_tree[0][1].text == "True": + sound_set () + else: + sound_unset () + # audiodev.unlock() + scene.objects['Cmd-text'].setVisible(False,False) ## -# Click pour enteindre la tablette +# Clic pour fermer la tablette ## def tablet_close_click(cont): @@ -853,11 +867,9 @@ color_link_hl = (0.799, 0.617, 0.021, 1) # Jaune ## def about_open(): - scene.objects['Terrain']['manip_mode']=9 # Fenêtre modale + scene.objects['Terrain']['manip_mode']=9 # Fenêtre modale About manip_reset() - # scene.objects['About_title'].color = color_black - # scene.objects['About_text'].color = color_black - # scene.objects['About_copyright'].color = color_black + scene.objects['About_link-git'].color= color_link scene.objects['About_link-gpl'].color= color_link scene.objects['About_link-upbge'].color= color_link @@ -912,7 +924,6 @@ def about_hl(cont): def about_close(): # sound_play (sndbuff_click) - print ("about_close():") scene.objects['Terrain']['manip_mode']=0 scene.objects['About'].setVisible(False,True) scene.objects['About'].worldPosition = [42, -2, 3] diff --git a/rp_doc.py b/rp_doc.py index 6f2b378..b16674e 100644 --- a/rp_doc.py +++ b/rp_doc.py @@ -19,19 +19,10 @@ import aud # Sounds scene = bge.logic.getCurrentScene() # Colors -# color_doc_chap = (0.153, 0.116, 0.105, 1) # WoodDark -# color_doc_fct = (0.326, 0.101, 0.0592, 1) # BrownDark -# color_doc_fct = (0.577, 0.233, 0.115, 1) # Brown -# color_doc_hl = (0.799, 0.617, 0.021, 1) # Yellow -# color_doc_hl = (0.13, 0.254, 0.407, 1) # BlueDark - color_doc_chap = (0, 1, 0.857,1) # Turquoise color_doc_fct = (0, 1, 0.857,1) # Turquoise color_doc_hl = (0.799, 0.617, 0.021, 1) # Jaune color_doc_activate = (0.936, 0.033, 1, 1) # Rose -# color_doc_activate = (1, 0.099, 0.981, 1) # Rose - -# scene.objects['Doc_icon_'+name_chap+'-text'].color = color_doc_activate # Sounds # audiodev = aud.Device() @@ -250,14 +241,6 @@ def open(): else: scene.objects['Doc_title'].setVisible(False,True) scene.objects['Doc_text'].setVisible(False,True) - - # Placer la page Généralité (page par défaut) - # scene.objects['Doc_chap-general'].worldPosition = scene.objects['Doc'].worldPosition - # scene.objects['Doc_chap-general'].setVisible(True,True) - # scene.objects['Doc']['page_chap'] = "general" - # scene.objects['Doc-general'].color = color_doc_activate - # scene.objects['Doc-general-text'].color = color_doc_activate - ## # Fermeture du livre