BECOME PART OF THE COMMUNITY - Sign up here
  • Good morning!

    I am creating a plugin and I need to manually edit the values of the type of faders in the fader example.

    I have tried both on the creation of the control and in the signalTable callback functions. I get the value via caller.Value but I cannot set it the same way. Any tips?

    Eventually, I would like a dialog fader to follow current attribute values in the programmer. Is this possible?

    Edited once, last by pikipupiba (July 10, 2022 at 9:31 PM).

  • I'm linking a bunch of faders to custom commands and need it to be able to load state after closing and reopening the interface.

    I'm using it to play around with aligns and phases and being able to slide the value smoothly.

  • I'm so close! You guys are amazing!

    So now I'm sticking on 2 points.

    1. The dialog fader will happily control the playback fader from your example, but the playback fader won't change my dialog fader. Would also be cool if those 2 things could stay linked even if I close the dialog. I'm thinking that I want to assign certain functions to certain masters with the plugin open and then be able to resume plugin use on physical faders after closing the dialog.

    2. I would like to pass the playback master objects to my ui builder functions and it doesn't appear as though I am passing it around correctly. Below is how I'm doing the thing.

  • Hi I'm looking to add some appearance thumbnails to a list of buttons.

    I created a dialogue with a list of all my appearances, but I want to add their thumbnail before the name.

    I think its possible, because the popup window for selecting appearances for objects contains a thumbail from the appearances.

    But I can't find how to do this? I searched in the programdata folder to find examples without luck.

  • Dialog Initial Focus

    Has anyone been able to set the focus to the popup dialog when it is opened?

    I tried messing with the global functions:
    FindBestFocus()

    and

    FindNextFocus()

    but without success.

    Tried adding Focus attribute (with "InitialFocus" or "CanHaveFocus") to some objects,
    but still no luck.

    Any ideas?

  • Hi,

    I have successfully created a custom dialogue with 9 buttons in a 3 x 3 configuration. I am trying to call my popup dialogue and send the button pressed to a variable in another function. The problem I am having is that the function continues to run in the background while the popup dialogue is active. Therefore my selection in the popup doesn't get injected into the function in the right place. Below is a simplified example of my scenario.

    The "popup" function returns the number of the button that was clicked.

    My issue is that the "getMode" function runs, then the "popup" function runs, and the "getMode" function finishes, then when I click the popup button, it doesn't get assigned to the "mode" variable and the function echoes a nil value.

    Is there a way to have the popup hault the running function until a selection or cancel happens?

    Thanks,

    Maxwell

    Code
    function getMode()
        local mode = popup()
        Echo(mode)
    end
  • the easiest solution would be to yield while the dialog exists:

    Code
    return function()
      local dialog = GetFocusDisplay().ScreenOverlay:Append('BaseInput')
      dialog.H, dialog.W = 300, 300
      dialog:Append('UIObject').Text = 'Hello World'
      while IsObjectValid(dialog) do coroutine.yield(0.1) end
      Echo('Goodbye world')
    end
  • the easiest solution would be to yield while the dialog exists:

    Code
    return function()
      local dialog = GetFocusDisplay().ScreenOverlay:Append('BaseInput')
      dialog.H, dialog.W = 300, 300
      dialog:Append('UIObject').Text = 'Hello World'
      while IsObjectValid(dialog) do coroutine.yield(0.1) end
      Echo('Goodbye world')
    end

    Hi Andreas,

    Thank you for your response. I ended up getting this working using the following code. Would you recommend your solution over the repeat loop I am using at the end? I'm just trying to learn how to make my code as efficient as possible.

    Thanks,
    Maxwell

  • don't do this:

    repeat until buttonReturn

    to see what's happening, try to exhange this line to

    repeat Echo('checking if there is a buttonReturn') until buttonReturn

    look at system monitor and the timestamps of the echos, and consider if this is efficient code.

    then try exchange with the equivalent of my suggestion:

    repeat Echo('checking if there is a buttonReturn') coroutine.yield(0.05) until buttonReturn

    look at system monitor and the timestamps again

    - checking 10-20 times a second instead of 10000+ times a second is more efficient.

  • You are absolutely correct. Thank you for your input.

    Best,

    Maxwell

  • Hi hepi,

    Have you been able get focus on the popup when it's opened?
    I'm also struggling to find a way...

  • make sure that the ui-element actually has been drawn on screen, before trying to give it focus

    Code: failing
    return function()
      local dialog = GetFocusDisplay().ScreenOverlay:Append('BaseInput')
      dialog.H, dialog.W = 100, 300
      dialog:Append('LineEdit')
      FindBestFocus(dialog)
    end
    Code: working but not ideal
    return function()
      local dialog = GetFocusDisplay().ScreenOverlay:Append('BaseInput')
      dialog.H, dialog.W = 100, 300
      dialog:Append('LineEdit')
      coroutine.yield(1)
      FindBestFocus(dialog)
    end
    Code: preferred solution
    return function()
      local dialog = GetFocusDisplay().ScreenOverlay:Append('BaseInput')
      dialog.H, dialog.W = 100, 300
      dialog:Append('LineEdit')
      dialog:WaitInit()
      FindBestFocus(dialog)
    end
  • 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

Participate now!

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