Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
It is possible like this:
from kivy.uix.button import Button
from kivy.core.window import Window
class HLButton(Button):
def __init__(self, *args, **kwargs):
super(HLButton, self).__init__(*args, **kwargs)
Window.bind(mouse_pos=self.pos_check)
def pos_check(self, inst, pos):
if self.collide_point(*pos):
self.background_color = (1, 0, 0, 1)
else:
self.background_color = (.52, .43, .57, 1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question