omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Creating touch location variables

    Pythonista
    2
    3
    1988
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HT
      HT last edited by

      Hello!

      I would like to initialize a variable that functions just like the one you get from touch.location (e.g. you can access the x coordinate with touch.location.x).

      If i initialize the variable like this

      x = [150, 200]

      it will not work with functions that only work with touch.locations.
      How can I create variables like this programmatically?

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        You could try something like ui.Point(150, 200).

        1 Reply Last reply Reply Quote 1
        • HT
          HT last edited by

          Works perfectly, thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors