and some intersting feature to the button

This commit is contained in:
shenjack 2023-08-29 20:46:26 +08:00
parent 42cc55bf96
commit 086a96672a
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -137,7 +137,10 @@ class PressTextButton(widgets.WidgetBase):
...
def on_press(self, x, y):
import random
self.value += "1"
next_rgb = [random.randint(50, 255) for _ in range(3)]
self.untouched_color = (*next_rgb, 255)
PressTextButton.register_event_type('on_press')