Posts by MTRobin

BECOME PART OF THE COMMUNITY - Sign up here

    Hi Everyone,

    Am I able to get the root index of a layout object by giving the ID of the macro assigned to that object?

    Something like this

    ShowData().DataPools.Default.Layouts[1].ID[2515]

    Where I give the ID number and it returns the index of that layout element.

    Thanks,

    Maxwell

    to my knowledge:

    only the mouse object has a get-able coordinates (cursor), not the touch object

    in Lua/UI context the touched object is the Layout Viewer Canvas, not the actual macro.

    still I don't think it is impossible to get the screen coordinates of the layout element, just a lot of work and calculation based on the properties of the canvas, and the properties of the layout elements.

    I think I can get the coordinates the hard way, by getting the object location within the layout, then do some math to get the coordinates on the screen within the layout. I am having trouble getting the current object information. Do you have any insight on which function would help me get the index of the object I touch in a layout view. Then I can get its coordinates within the layout, and go from there.

    Thanks,

    Maxwell

    You can also control the color of the bars above the checkboxes, as shown below. I've attached the updated example code.

    Looking at this code, do you know how we can input a custom color instead of using the system colors in the Root folder?

    Looking for something like this:

    Code
    local colorBackground = '3484F0FF'
    --OR--
    local colorBackground = '(52,132,240,1.00)'

    Thanks,

    Maxwell

    Hi,

    I am on MA3 and trying to get the X,Y coordinates of either the users touchscreen press or the coordinates of the object they touched. Is this possible in LUA?

    Example:

    When the user presses a macro in a layout window I run a LUA function that opens a Popup Input Dialog. I am trying to get this popup to open where the layout object's X, Y coordinates are on screen.

    Thanks,

    Maxwell

    You are absolutely correct. Thank you for your input.

    Best,

    Maxwell

    Hi,

    I am wondering if anyone has been able to get the coordinates of the user input on the touchscreens, or even just able to get the position of the object that was selected? I have created a custom dialog in Lua that is triggered from a macro in MA. When the user taps on the macro in a layout, the popup appears at 0,0. I am able to input coordinates to place the dialog anywhere on the screen, but I would prefer to make it dynamic so the coordinates come from wherever the user tapped. Again, for my purposes this can come from the user tap coordinates or the coordinates of the tapped object on the layout. This would function just like a swipey, but without the 'Swiping' part.

    Thank you,
    Maxwell