Raymond
Aug 25, 2022 - 11:30
How to get the touch position on ui.View() ? Without using any library exept “ui” ?
How to get the touch position on ui.View() ? Without using any library exept “ui” ?
@Raymond by subclassing ui.View.
See Examples/User Interface/Sketch.py
import ui
class MyView(ui.View):
def touch_began(self, touch):
x,y = touch.location
self.name = f'x={x} y={y}'
v = MyView()
v.background_color = 'white'
v.present('fullscreen')
@Raymond did my post answer to your question?
Yes Yes Yes!!!! Thank you very much dude !!!