mirror of
https://forge.apps.education.fr/phroy/codetower.git
synced 2024-01-27 11:35:17 +01:00
modification du about
This commit is contained in:
parent
efc7a59812
commit
fe22927048
BIN
asset/icons/icon_about-hl.FCStd
Normal file
BIN
asset/icons/icon_about-hl.FCStd
Normal file
Binary file not shown.
8442
asset/icons/icon_about-hl.obj
Normal file
8442
asset/icons/icon_about-hl.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
27
ct.py
27
ct.py
@ -34,7 +34,7 @@ import ct_map1 as ct_map # waves script
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# Dynamic import user file
|
# Dynamic import user file
|
||||||
sys.setrecursionlimit(10**6) # Limite sur la récursivité (valeur par défaut : 1000) -> segfault de Blender
|
sys.setrecursionlimit(10**5) # Limite sur la récursivité (valeur par défaut : 1000) -> segfault de Blender
|
||||||
importlib.invalidate_caches()
|
importlib.invalidate_caches()
|
||||||
# ct_map = importlib.import_module('ct_map1') # Waves script
|
# ct_map = importlib.import_module('ct_map1') # Waves script
|
||||||
ct_cmd = importlib.import_module('ct_cmd') # User script (commands)
|
ct_cmd = importlib.import_module('ct_cmd') # User script (commands)
|
||||||
@ -68,8 +68,10 @@ color_text_yellow = (0.799, 0.617, 0.021, 1)
|
|||||||
|
|
||||||
color_cmd = (0.8, 0.8, 0.8, 1) # blanc
|
color_cmd = (0.8, 0.8, 0.8, 1) # blanc
|
||||||
color_cmd_hl = (0.8, 0.619, 0.021, 1) # jaune
|
color_cmd_hl = (0.8, 0.619, 0.021, 1) # jaune
|
||||||
color_link = (0.024, 0.006, 0.8, 1) # bleu
|
# color_link = (0.024, 0.006, 0.8, 1) # bleu
|
||||||
color_link_hl = (0.8, 0.005, 0.315, 1) # majenta
|
# color_link_hl = (0.8, 0.005, 0.315, 1) # majenta
|
||||||
|
color_link = (0.799, 0.617, 0.021, 1)
|
||||||
|
color_link_hl = (0.8, 0.8, 0.8, 1)
|
||||||
|
|
||||||
# Sounds
|
# Sounds
|
||||||
audiodev = aud.Device()
|
audiodev = aud.Device()
|
||||||
@ -461,6 +463,7 @@ def cmd_init():
|
|||||||
scene.objects['Stop'].setVisible(False,False)
|
scene.objects['Stop'].setVisible(False,False)
|
||||||
scene.objects['Stop-Hl'].setVisible(False,False)
|
scene.objects['Stop-Hl'].setVisible(False,False)
|
||||||
scene.objects['Construc-Hl'].setVisible(False,False)
|
scene.objects['Construc-Hl'].setVisible(False,False)
|
||||||
|
scene.objects['About-cmd-Hl'].setVisible(False,False)
|
||||||
|
|
||||||
scene.objects['Map_text'].setVisible(False,False)
|
scene.objects['Map_text'].setVisible(False,False)
|
||||||
scene.objects['Text_info-1'].setVisible(False,False)
|
scene.objects['Text_info-1'].setVisible(False,False)
|
||||||
@ -484,7 +487,7 @@ def cmd_hl(cont):
|
|||||||
|
|
||||||
# Activation
|
# Activation
|
||||||
if cont.sensors['MO'].status == JUST_ACTIVATED and scene.objects['Terrain']['manip_mode']==0:
|
if cont.sensors['MO'].status == JUST_ACTIVATED and scene.objects['Terrain']['manip_mode']==0:
|
||||||
if obj.name!="Run" and obj.name!="Pause" and obj.name!="Run-Hl" and obj.name!="Pause-Hl" and obj.name!="Stop" and obj.name!="Stop-Hl" and obj.name!="About-cmd":
|
if obj.name!="Run" and obj.name!="Pause" and obj.name!="Run-Hl" and obj.name!="Pause-Hl" and obj.name!="Stop" and obj.name!="Stop-Hl" :
|
||||||
obj.setVisible(False,True)
|
obj.setVisible(False,True)
|
||||||
scene.objects[obj.name+'-Hl'].setVisible(True,True)
|
scene.objects[obj.name+'-Hl'].setVisible(True,True)
|
||||||
|
|
||||||
@ -505,7 +508,7 @@ def cmd_hl(cont):
|
|||||||
|
|
||||||
# Désactivation
|
# Désactivation
|
||||||
if cont.sensors['MO'].status == JUST_RELEASED and scene.objects['Terrain']['manip_mode']==0:
|
if cont.sensors['MO'].status == JUST_RELEASED and scene.objects['Terrain']['manip_mode']==0:
|
||||||
if obj.name!="Run" and obj.name!="Pause" and obj.name!="Run-Hl" and obj.name!="Pause-Hl" and obj.name!="Stop" and obj.name!="Stop-Hl" and obj.name!="About-cmd":
|
if obj.name!="Run" and obj.name!="Pause" and obj.name!="Run-Hl" and obj.name!="Pause-Hl" and obj.name!="Stop" and obj.name!="Stop-Hl" :
|
||||||
scene.objects[obj.name+'-Hl'].setVisible(False,True)
|
scene.objects[obj.name+'-Hl'].setVisible(False,True)
|
||||||
obj.setVisible(True,True)
|
obj.setVisible(True,True)
|
||||||
|
|
||||||
@ -696,14 +699,16 @@ def manip_wheel(cont):
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
def about_open():
|
def about_open():
|
||||||
scene.objects['Aboutbanner_title'].color = color_black
|
scene.objects['About_title'].color = color_black
|
||||||
scene.objects['Aboutbanner_text'].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_git'].color= color_link
|
||||||
scene.objects['About_link_gpl'].color= color_link
|
scene.objects['About_link_gpl'].color= color_link
|
||||||
scene.objects['About_link_blender'].color= color_link
|
scene.objects['About_link_blender'].color= color_link
|
||||||
scene.objects['About_link_upbge'].color= color_link
|
scene.objects['About_link_upbge'].color= color_link
|
||||||
scene.objects['About_link_kay'].color= color_link
|
scene.objects['About_link_kay'].color= color_link
|
||||||
scene.objects['About_link_kenney'].color= color_link
|
scene.objects['About_link_kenney'].color= color_link
|
||||||
|
scene.objects['About_ok'].color = color_black
|
||||||
scene.objects['About'].setVisible(True,True)
|
scene.objects['About'].setVisible(True,True)
|
||||||
scene.objects['About'].worldPosition = [0, 1.53623, -0.892838]
|
scene.objects['About'].worldPosition = [0, 1.53623, -0.892838]
|
||||||
scene.objects['About']['timer'] = 0
|
scene.objects['About']['timer'] = 0
|
||||||
@ -720,12 +725,12 @@ def about_open_anim():
|
|||||||
def about_hl(cont):
|
def about_hl(cont):
|
||||||
if cont.sensors['MO'].status == JUST_ACTIVATED:
|
if cont.sensors['MO'].status == JUST_ACTIVATED:
|
||||||
scene.objects['Aboutbanner'].color = color_white
|
scene.objects['Aboutbanner'].color = color_white
|
||||||
scene.objects['Aboutbanner_ok'].color = color_white
|
scene.objects['About_ok'].color = color_white
|
||||||
scene.objects['Aboutbanner_title'].color = color_white
|
scene.objects['About_title'].color = color_white
|
||||||
if cont.sensors['MO'].status == JUST_RELEASED:
|
if cont.sensors['MO'].status == JUST_RELEASED:
|
||||||
scene.objects['Aboutbanner'].color = color_endbanner_bluelight
|
scene.objects['Aboutbanner'].color = color_endbanner_bluelight
|
||||||
scene.objects['Aboutbanner_ok'].color = color_black
|
scene.objects['About_ok'].color = color_black
|
||||||
scene.objects['Aboutbanner_title'].color = color_black
|
scene.objects['About_title'].color = color_black
|
||||||
|
|
||||||
def about_close(cont):
|
def about_close(cont):
|
||||||
if cont.sensors['Click'].status == JUST_ACTIVATED and cont.sensors['MO'].positive :
|
if cont.sensors['Click'].status == JUST_ACTIVATED and cont.sensors['MO'].positive :
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<data>
|
<data>
|
||||||
<config>
|
<config>
|
||||||
<speed>2.0</speed>
|
<speed>10.0</speed>
|
||||||
</config>
|
</config>
|
||||||
</data>
|
</data>
|
Loading…
Reference in New Issue
Block a user