Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed : Site A Button | Sit A button Image change | Spawn Slider | Site A button Accessible | Issue 3 & 2 & 5 & 4 #12

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions screenLayout/sitea_screen.kv
Copy link
Author

@shashank21raj shashank21raj Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the Issue 2, i have added the "if splash_bg_after.opacity == 1 else False" in the disabled parameter which was only set as true.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the Issue 5, the button_id for the button 5 was set as 4 which I changed to 5

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
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



Expand Down Expand Up @@ -112,8 +112,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
Expand Down
2 changes: 1 addition & 1 deletion screens/siteA.py
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is for the Issue 4, I have changed the source of the Image file from off.png to on.png in the if else statement

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion screens/spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down