the focus of the knobs is removed, when the fx_mode is changed

This commit is contained in:
SallarShayegan
2025-02-28 14:21:06 +01:00
parent b960bcbd7f
commit 31ae63b594
3 changed files with 8 additions and 7 deletions

View File

@ -78,9 +78,9 @@ class Knobs:
for i in range(len(line_points)-1):
pygame.draw.line(self.gui.screen, color_primary_dark, line_points[i], line_points[i+1], 2)
def deactivate_knobs_except(self, knob):
def set_focused(self, knob):
for k in self.knobs:
if k != knob: k.set_focused(False)
k.set_focused(k == knob)
def display(self):
for knob in self.knobs: