and some intersting feature to the button
This commit is contained in:
parent
42cc55bf96
commit
086a96672a
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user