Hi there, Im trying to create a Pixel Art game in which the player can choose a color to draw something. I have multiple colored buttons, as shown in the image and i declared the variables for them and then placed them in a list. What I
m trying to achieve is that for each color button in the list Im using the on_click event and then call a function named set_color inside the on_click method. The problem is that when I
m passing an argument into the set_color function, the program doesnt work, the buttons aren
t clickable. It seems to only work if I don`t pass any arguments into the set_color function.
Did anyone ever try to do something similiar and could help me. I know I could create a separate function for each on_click event for the colored buttons, however it would require writing a lot of repetitive code and I`m trying to achieve a more optimized code.