Михаил Капелько 5 months ago
parent
commit
810c951a29
3 changed files with 33 additions and 1 deletions
  1. +25
    -0
      v5/desktop.py
  2. +4
    -0
      v5/main-gui.py
  3. +4
    -1
      v5/memory_Context.py

+ 25
- 0
v5/desktop.py View File

@@ -104,6 +104,19 @@ def desktop_displayDesc(p):
#}
#}

# Display ending splash screen
#
# Conditions:
# 1. Time to display victory screen
def desktop_displayEndingSplashScreen(p):
if (
p.c.recentField == "displayEndingSplashScreen"
):
p.splash.texture = p.splashTextures[1]
p.splash.visible = True
#}
#}

# Hide deselected tile and show selected one
#
# Conditions:
@@ -266,6 +279,18 @@ def desktop_scheduleDeselectionOfMismatchedTiles(p):
#}
#}

# Postpone display of the ending splash screen
#
# Conditions:
# 1. just finished removing all tiles
def desktop_scheduleDisplayOfEndingSplashScreen(p):
if (
p.c.recentField == "victory"
):
p.sequentialTimer.schedule("displayEndingSplashScreen", True, p.c.splashEndDelay)
#}
#}

# Postpone hiding of matching tiles for better UX
#
# Conditions:


+ 4
- 0
v5/main-gui.py View File

@@ -97,12 +97,14 @@ def process(c):
# Similar to context functions, but no platform is returned.
desktop_deselectMismatchedTiles(p)
desktop_displayDesc(p)
desktop_displayEndingSplashScreen(p)
desktop_displaySelectedTile(p)
desktop_displayTitle(p)
desktop_hideBeginningSplashScreen(p)
desktop_hideDesc(p)
desktop_hideMatchingTiles(p)
desktop_hideTitle(p)
desktop_scheduleDisplayOfEndingSplashScreen(p)
desktop_scheduleHidingOfBeginningSplashScreen(p)
desktop_scheduleHidingOfMatchingTiles(p)
desktop_scheduleDeselectionOfMismatchedTiles(p)
@@ -120,6 +122,8 @@ ctrl.set("descImageHeight", 250)
ctrl.set("descImageWidth", 375)
ctrl.set("descPosition", [19, 12])
ctrl.set("hideMatchingTilesDelay", 500)
ctrl.set("splashBeginTimeout", 2000)
ctrl.set("splashEndDelay", 700)
ctrl.set("splashImage", "res/splash.png")
ctrl.set("splashImageCount", 2)
ctrl.set("splashImageHeight", 600)


+ 4
- 1
v5/memory_Context.py View File

@@ -11,8 +11,10 @@ class memory_Context:
self.deselectMismatchedTiles = False
self.deselectMismatchedTilesDelay = 0
self.didLaunch = False
self.displayEndingSplashScreen = False
self.exit = False
self.hiddenItems = []
self.hideBeginningSplashScreen = False
self.hideMatchingTiles = False
self.hideMatchingTilesDelay = 0
self.input = ""
@@ -29,7 +31,8 @@ class memory_Context:
self.recentField = "none"
self.selectedId = -1
self.selectedItems = []
self.splashBeginTimeout = 2000
self.splashBeginTimeout = 0
self.splashEndDelay = 0
self.splashImage = ""
self.splashImageCount = 0
self.splashImageHeight = 0


Loading…
Cancel
Save