Skip to content

Commit

Permalink
Corregido un glitch en el Panel de Estrellas.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrossyamitrano committed Mar 3, 2022
1 parent c7eb02d commit 99e6363
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion engine/frontend/widgets/panels/star_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,19 @@ def load_stars(self, event):
self.current.current = self.star_buttons[0].object_data
self.current.enable()

def deselect_buttons(self):
for button in self.star_buttons:
button.deselect()

def show(self):
super().show()
self.sort_buttons(self.star_buttons)
for obj in self.properties.widgets():
obj.show()
if self.current.has_values:
self.current.current.sprite.show()
else:
self.deselect_buttons()

def hide(self):
super().hide()
Expand Down Expand Up @@ -192,6 +198,7 @@ def show_current(self, star):
def clear(self, event):
if event.data['panel'] is self.parent:
self.erase()
self.parent.deselect_buttons()
self.parent.button_del.disable()
self.parent.button_add.disable()

Expand Down Expand Up @@ -236,7 +243,7 @@ def fill(self, tos=None):
new = StarSprite(self, self.current, 460, 100)
if new.is_distict(self.current.sprite):
self.current.sprite = new
self.properties.add(self.current.sprite)
self.properties.add(self.current.sprite, layer=3)

self.current.sprite.show()
self.parent.age_bar.enable()
Expand Down

0 comments on commit 99e6363

Please sign in to comment.