About : liens forge et upbge avec le texte

This commit is contained in:
Philippe Roy 2023-12-02 16:44:40 +01:00
parent bd2648ab78
commit b36244ee86
3 changed files with 28 additions and 20 deletions

Binary file not shown.

View File

@ -78,8 +78,11 @@ def open():
# Liens
scene.objects['About_link-git'].color= color_link
scene.objects['About_text-git'].color= color_link
scene.objects['About_text2-git'].color= color_link
scene.objects['About_link-gpl'].color= color_link
scene.objects['About_link-upbge'].color= color_link
scene.objects['About_text-upbge'].color= color_link
# Animation
scene.objects['About'].setVisible(True,True)
@ -132,16 +135,33 @@ def open_anim():
##
def hl(cont):
if cont.sensors['MO'].status == JUST_ACTIVATED:
# Focus sourie
if cont.sensors['MO'].status == JUST_ACTIVATED :
obj = cont.owner
name=obj.name[:-7]
scene.objects[name].color = color_link_hl
if cont.sensors['MO'].status == JUST_RELEASED:
# Liens composés de texte
if name == "About_link-git":
scene.objects["About_text-git"].color = color_link_hl
scene.objects["About_text2-git"].color = color_link_hl
if name == "About_link-upbge":
scene.objects["About_text-upbge"].color = color_link_hl
# Perte du focus sourie
if cont.sensors['MO'].status == JUST_RELEASED :
obj = cont.owner
name=obj.name[:-7]
scene.objects[name].color = color_link
# Liens composés de texte
if name == "About_link-git":
scene.objects["About_text-git"].color = color_link
scene.objects["About_text2-git"].color = color_link
if name == "About_link-upbge":
scene.objects["About_text-upbge"].color = color_link
##
# Liens
##
@ -156,18 +176,6 @@ def link(cont):
'About_link-upbge' : 'https://www.upbge.org'}
webbrowser.open(link [name])
def link_hl(cont):
decal = 15
if cont.sensors['MO'].status == JUST_ACTIVATED :
obj = cont.owner
name=obj.name[:-7]
scene.objects[name].color = color_link_hl
if cont.sensors['MO'].status == JUST_RELEASED :
obj = cont.owner
name=obj.name[:-7]
scene.objects[name].color = color_link
###############################################################################
# Page Crédits
###############################################################################

View File

@ -3,14 +3,14 @@
<speed>1.0</speed>
<sound>False</sound>
<cam>
<worldPosition.x>-3.413217782974243</worldPosition.x>
<worldPosition.y>-5.997838020324707</worldPosition.y>
<worldPosition.z>7.996504783630371</worldPosition.z>
<worldPosition.x>0.0057830810546875</worldPosition.x>
<worldPosition.y>-26.440298080444336</worldPosition.y>
<worldPosition.z>20.22315788269043</worldPosition.z>
</cam>
<screen>
<width>1557</width>
<height>875</height>
<quality>0</quality>
<width>1556</width>
<height>876</height>
<quality>4</quality>
</screen>
</config>
<mission>