Forum
    • Categories
    • Register
    • Login

    getPosition function

    Scheduled Pinned Locked Moved Feature Requests
    4 Posts 2 Posters 33 Views
    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.
    • David HealeyD
      David Healey
      last edited by

      We have setPosition but it would be useful sometimes to be able to get the position of a component. I can see that there is already a getPosition function defined in the source which returns a rectangle type, but I can't figure out how to wrap that into a script function.

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      D 1 Reply Last reply Reply Quote 2
      • D
        daniloprates @David Healey
        last edited by

        @David-Healey wouldn't .get('x') and .get('y') be enough?

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @daniloprates
          last edited by

          @daniloprates that's the current method but that's 4 function calls each time i want the position of a control.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          D 1 Reply Last reply Reply Quote 0
          • D
            daniloprates @David Healey
            last edited by

            @David-Healey I have an Utils.js file where I create abstractions for every tedious thing like this, but a native function would be useful indeed

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            22

            Online

            2.1k

            Users

            13.0k

            Topics

            113.0k

            Posts