BECOME PART OF THE COMMUNITY - Sign up here
  • Does anyone have a working example of the PopupInput?

    I am also wondering if anyone has an example on how to lay out a UI with rows and columns? For example, multiple rows that each contain text and a checkbox (or other defined elements). I see that this is doable (based on the MA3 Tools plugins) but haven't been able to get to the bottom of it.

    Edited once, last by tps (August 10, 2021 at 8:05 PM).

  • I was interested in what the MATools guys had done too and noticed that it looks like compiled code and based on some the the text in the file base64 payload it seems they are very close to MA.

    In other words, we may never find out :)

  • I made this cheat for myself for popupinput for myself a while ago:

    Code
    -- Popup Box to select from a list of items
    local modes = {"Off", "Auto", "Slow", "10% Steps", "Large Jumps", "Small Jumps", "Tiny Jumps", "Random"}; -- The Items
    local ret = PopupInput("Select fader test mode", display_handle, modes); -- The popup box sets the variable 'ret'
    --or
    local r = PopupInput(title, display_handle, modes,"Random",900,500) -- Defaults to Random and places box at X:900,Y:500

    Does anyone have a working example of the PopupInput?

    I am also wondering if anyone has an example on how to lay out a UI with rows and columns? For example, multiple rows that each contain text and a checkbox (or other defined elements). I see that this is doable (based on the MA3 Tools plugins) but haven't been able to get to the bottom of it.

  • I made this cheat for myself for popupinput for myself a while ago:

    Code
    -- Popup Box to select from a list of items
    local modes = {"Off", "Auto", "Slow", "10% Steps", "Large Jumps", "Small Jumps", "Tiny Jumps", "Random"}; -- The Items
    local ret = PopupInput("Select fader test mode", display_handle, modes); -- The popup box sets the variable 'ret'
    --or
    local r = PopupInput(title, display_handle, modes,"Random",900,500) -- Defaults to Random and places box at X:900,Y:500

    What version did you have this working in? I get errors about the first parameter when trying to run in 1.5 - seems odd since it is just a string.

  • They changed PopupInput() recently. Try this:

    Code
    function DisplayPopup(displayHandle)
        local modes = {"Off", "Auto", "Slow", "10% Steps", "Large Jumps", "Small Jumps", "Tiny Jumps", "Random"}
        local selectedIndex, selectedMode
        selectedIndex, selectedMode = PopupInput({title = "Mode", caller = displayHandle, items = modes})
        Echo("Selected index: " .. selectedIndex .. ", mode: " .. selectedMode)
    end
    
    return DisplayPopup
  • Getting the overlay via the display index and assuming Pult 1, will fail if the Plugin is called from the web-remote.

    instead of

    Code
    -- Get the overlay.
    local display = Root().GraphicsRoot.PultCollect:Ptr(1).DisplayCollect:Ptr(displayIndex)
    local screenOverlay = display.ScreenOverlay

    you could rather use

    Code
    -- Get the overlay.
    local display = GetFocusDisplay()
    local screenOverlay = display.ScreenOverlay

    or (to keep your logic that forces dialog on Display 1, when plugin is called on Display 6&7):

    Code
    -- Get the overlay.
    local display = GetDisplayByIndex(displayIndex)
    local screenOverlay = display.ScreenOverlay
  • This example shows how you can display faders on a dialog. It also shows how a resize corner can be included to allow the user to change the size of the dialog. I've attached the LUA script for this.


    There appears to be a lot of UI controls available for creating dialogs.

    For example, take a look inside any of the "*.uixml" files that can be found below "C:\ProgramData\MALightingTechnology\gma3_1.5.2\shared\resource" on a Windows onPC installation. These files appear to contain an XML definition of the dialogs used by the MA system. This is a useful source of information regarding the names of the available UI controls and their properties.

    Also, if you look at some of the .lua files below that path you will find examples of the signalTable being used to respond to UI events.

    Hopefully that will be of help to others.

  • Sorry a bit late to this thread.

    Firstly, Nigel63 amazing work here!!

    One thing, we can add the colour bar to the checkbox items. But is there a property to add to, or even a coloured border to the button?

    I can’t seem to crack it this far but would be great if possible.

    Thanks!

  • This example shows how you can display faders on a dialog.

    This was INDEED helpful.
    I managed to integrate it in my code but I have a question about the fader-values.

    How can I read out the current value of the faders and use it as a number in my main code?

    I've catched it from the caller.value near the end of the script, but I just need the value after the fader is adjusted so I thought it might be a simpler way..

    And - is it possible to set the initial value of the faders?

  • And - is it possible to set the initial value of the faders?

    the UiFader is just a graphical element, I believe it needs to be connected to something "real" to do that.

    - abusing any of the numerous playback-masters should do the trick:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!