Here’s a snippet for Kivy, which adds functionality to get the widget at a given screen position. It’s probably not the most refined approach in the world but until we can get a proper mouse over event, this seems to work for now.
To use it, simply add it to your App class like:
class TestApp(WidgetPosition, App):
And here’s the code:
class WidgetPosition: def get_widget_at(self, pos, node=None): x, y = pos if not node: node = self.root for widget in node.children: if self._is_over_widget(widget, x, y): return self.get_widget_at(pos, widget) if ...