BECOME PART OF THE COMMUNITY - Sign up
here
-
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.
-
This example shows how you can layout input controls, with each input having an associated icon and label. I've attached the LUA script for this.

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

-
Thanks Andreas. I didn't test with the Web Remote. I have now!
I've updated my example script using your suggestion to get the display using GetDisplayByIndex() and I've attached the updated version.

-
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).
Do you mean something like the dialog shown below? I've attached an example LUA script to do this.

-
They changed PopupInput() recently. Try this:
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
-
Thanks for the link to your api wiki. Very useful.
There is an example of what looks like a MessageBox() that uses icons and colors for the inputs. I'll send you a copy.
-
Hi,
If it isn't possible to add icons and control the background color of inputs using the MessageBox() function, does anyone know if it is possible to create your own custom modal dialogs?
I notice the LUA test code that comes with the desk sometimes gets a ModalOverlay and then calls Append("Button").
I'm wondering if this technique can be used to build your own modals from scratch. I've tried this, but without more information like a good example I've not managed to get very far!
Thanks,
Nigel
-
Hi,
I'm using the LUA MessageBox() command to display a dialog containing multiple inputs, and it works fine, as shown below.
local result = MessageBox({
icon="time",
backColor="Global.PartlySelected",
title = "Example Title",
message = "This is the message.",
commands = {{value=1, name="Ok"}, {value=2, name="Cancel"}},
inputs = {
{name = "Example Input 1", value = "100"},
{name = "Example Input 2", value = "200"}
},
})
Display More
This results in the following dialog.

What I'd like to do is display a different icon for each input at the start of each input row.
Also, I'd like to set the background color of each input row differently.
I've seen examples of this being done, but can't find out how to do it!
I've tried the obvious. e.g. using "icon" and "backColor" properties on the inputs table, but it doesn't work.
Any help would be appreciated.
Thanks,
Nigel