tingbot / tingbot-python

🔩 Python APIs to write apps for Tingbot
Other
18 stars 9 forks source link

Mac simulator doesn't give correct touch coordinates until the window is moved #34

Closed joerick closed 8 years ago

joerick commented 8 years ago

Steps to recreate:

Run this code in the simulator:

import tingbot
from tingbot import *

screen.fill(color='blue')

@touch()
def on_touch(xy):
    screen.fill('black')
    screen.text('touch: ' + str(xy), color='white')

# run the app
tingbot.run()

Try clicking the screen. Incorrect coordinates are shown.

Move the simulator window and try again. The correct coordinates are shown.