diff --git a/screenLayout/sitea_screen.kv b/screenLayout/sitea_screen.kv index 188812c..48a9535 100644 --- a/screenLayout/sitea_screen.kv +++ b/screenLayout/sitea_screen.kv @@ -44,8 +44,10 @@ size_hint: None,None size: dp(80), dp(80) pos: dp(261), dp(347) - disabled: True - + disabled: True if splash_bg_after.opacity == 1 else False + on_press: + root.change_img(self, 3) + root.check_product(self, 3) @@ -112,8 +114,8 @@ pos: dp(261), dp(242) disabled: True if splash_bg_after.opacity == 1 else False on_press: - root.change_img(self, 4) - root.check_product(self, 4) + root.change_img(self, 5) + root.check_product(self, 5) Image: id: 5 diff --git a/screens/siteA.py b/screens/siteA.py index b310bca..9355055 100644 --- a/screens/siteA.py +++ b/screens/siteA.py @@ -18,7 +18,7 @@ def show_overlay(self): # Updating the window state after correct combination def change_img(self, button, idOG): # Toggle the button states to on(green)/off(grey) on press idOG_dynamic = f"{idOG}" widget = getattr(self.ids, idOG_dynamic, None) - widget.source = "assets/img/symbols/off.png" if widget.source == "assets/img/symbols/off.png" else "assets/img/symbols/off.png" + widget.source = "assets/img/symbols/off.png" if widget.source == "assets/img/symbols/on.png" else "assets/img/symbols/off.png" def check_product(self, instance, id): # Check for correct code combination button_id = id diff --git a/screens/spawn.py b/screens/spawn.py index f770ff0..5762717 100644 --- a/screens/spawn.py +++ b/screens/spawn.py @@ -10,7 +10,7 @@ class SpawnScreen(Screen): verified = False def slider_val_change(self): - if not SpawnScreen.verified and ((self.ids.slide1.value < slider[0]+5) and (self.ids.slide1.value > slider[0]-5 )) and ((self.ids.slide2.value < slider[2]+5)and ( self.ids.slide2.value > slider[2]-5 )) and ((self.ids.slide3.value < slider[2]+5) and (self.ids.slide3.value > slider[2]-5 )): + if not SpawnScreen.verified and ((self.ids.slide1.value < slider[0]+5) and (self.ids.slide1.value > slider[0]-5 )) and ((self.ids.slide2.value < slider[1]+5)and ( self.ids.slide2.value > slider[1]-5 )) and ((self.ids.slide3.value < slider[2]+5) and (self.ids.slide3.value > slider[2]-5 )): SpawnScreen.verified = True self.ids.splash_bg.opacity = 0 self.ids.splash_bg_after.opacity = 1