d
This commit is contained in:
@@ -76,6 +76,24 @@ def desktop_deselectMismatchedTiles(p):
|
|||||||
#}
|
#}
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
# Display description for the first selected tile
|
||||||
|
#
|
||||||
|
# Conditions:
|
||||||
|
# 1. tile has just been selected and it's the first one in pair
|
||||||
|
def desktop_displayDesc(p):
|
||||||
|
if (
|
||||||
|
p.c.recentField == "selectedId" and
|
||||||
|
(
|
||||||
|
len(p.c.selectedItems) == 0 or
|
||||||
|
len(p.c.selectedItems) == 2
|
||||||
|
)
|
||||||
|
):
|
||||||
|
gid = p.c.playfieldItems[p.c.selectedId]
|
||||||
|
p.desc.texture = p.descTextures[gid]
|
||||||
|
p.desc.visible = True
|
||||||
|
#}
|
||||||
|
#}
|
||||||
|
|
||||||
# Hide deselected tile and show selected one
|
# Hide deselected tile and show selected one
|
||||||
#
|
#
|
||||||
# Conditions:
|
# Conditions:
|
||||||
@@ -108,6 +126,19 @@ def desktop_displayTitle(p):
|
|||||||
#}
|
#}
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
# Hide description
|
||||||
|
#
|
||||||
|
# Conditions:
|
||||||
|
# 1. tiles has been mismatched or timed out to to hide after matching
|
||||||
|
def desktop_hideDesc(p):
|
||||||
|
if (
|
||||||
|
p.c.recentField == "hideMatchingTiles" or
|
||||||
|
p.c.recentField == "mismatchedItems"
|
||||||
|
):
|
||||||
|
p.desc.visible = False
|
||||||
|
#}
|
||||||
|
#}
|
||||||
|
|
||||||
# Hide matching tiles
|
# Hide matching tiles
|
||||||
#
|
#
|
||||||
# Conditions:
|
# Conditions:
|
||||||
@@ -126,7 +157,7 @@ def desktop_hideMatchingTiles(p):
|
|||||||
# Hide title
|
# Hide title
|
||||||
#
|
#
|
||||||
# Conditions:
|
# Conditions:
|
||||||
# 1. tiles has been scheduled to hide after being matched or just mismatched
|
# 1. tiles has been mismatched or timed out to to hide after matching
|
||||||
def desktop_hideTitle(p):
|
def desktop_hideTitle(p):
|
||||||
if (
|
if (
|
||||||
p.c.recentField == "hideMatchingTiles" or
|
p.c.recentField == "hideMatchingTiles" or
|
||||||
|
|||||||
@@ -95,8 +95,10 @@ def process(c):
|
|||||||
# Perform context dependent calls of desktop functions.
|
# Perform context dependent calls of desktop functions.
|
||||||
# Similar to context functions, but no platform is returned.
|
# Similar to context functions, but no platform is returned.
|
||||||
desktop_deselectMismatchedTiles(p)
|
desktop_deselectMismatchedTiles(p)
|
||||||
|
desktop_displayDesc(p)
|
||||||
desktop_displaySelectedTile(p)
|
desktop_displaySelectedTile(p)
|
||||||
desktop_displayTitle(p)
|
desktop_displayTitle(p)
|
||||||
|
desktop_hideDesc(p)
|
||||||
desktop_hideMatchingTiles(p)
|
desktop_hideMatchingTiles(p)
|
||||||
desktop_hideTitle(p)
|
desktop_hideTitle(p)
|
||||||
desktop_scheduleHidingOfMatchingTiles(p)
|
desktop_scheduleHidingOfMatchingTiles(p)
|
||||||
|
|||||||
Reference in New Issue
Block a user