r = moai.Request(title$, body$, buts$[, icon$])
body$
) and also allows the user to make a selection using one
of the buttons specified by buts$
. Optionally, you can also specify
an icon that should be displayed in the requester. If you specify
an empty string in title$
, it will automatically use the title
specified in @APPTITLE
.
Separate the buttons specified in buts$
by a "|". The return value
tells you which button the user pressed. Please note that the rightmost
button always has the value of False
(0) because it is typically used as
the "Cancel" button. If you have for example three button choices "One|Two|Three",
the button "Three" has return value 0, "Two" returns 2, and "One" returns 1.
The optional argument icon$
can be set to one of the following predefined
values:
"None":
"Information":
"Error":
"Warning":
"Question":
moai.Request("RapaGUI", "Hello!\n\n" .. "Do you like RapaGUI!", "Yes|No")The code above demonstrates the use of the
moai.Request()
function.