UI

Name: create
Type: function
Return type: bool

// create a UI panel for this script

Events.onload(function (ui)
{
    ui.create();
});

Name: createUserListMenuOption
Type: function
Return type: bool
Argument 1: string
Argument 2: function

// create an additional right-click menu option for the user list

Events.onload(function (ui)
{
    ui.createUserListMenuOption("my option", function (roomobj, userobj)
    {
        alert("you clicked on " + userobj.name + " in " + roomobj.name);
    });
});

Name: createRoomMenuOption
Type: function
Return type: bool
Argument 1: string
Argument 2: function

// create an additional option for the room options menu

Events.onload(function (ui)
{
    ui.createRoomMenuOption("my option", function (roomobj)
    {
        alert("you clicked on my option");
    });
});

// create an additional option for the room options menu with a check state

Events.onload(function (ui)
{
    var initial_state = false; // option starts unchecked

    ui.createRoomMenuOption("my option", function (roomobj, state)
    {
        alert("current check state is: " + (state == 1 ? "checked" : "unchecked"));
    }, initial_state);
});

Name: createTextBox
Type: function
Return type: UITextBox

// add a textbox to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var textbox = ui.createTextBox();
});

Name: createTextArea
Type: function
Return type: UITextArea

// add a multi-line textbox to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var textarea = ui.createTextArea();
});

Name: createCheckBox
Type: function
Return type: UICheckBox

// add a checkbox to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var checkbox = ui.createCheckBox();
});

Name: createGroupBox
Type: function
Return type: UIGroupBox

// add a group box to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var groupbox = ui.createGroupBox();
});

Name: createLabel
Type: function
Return type: UILabel

// add a label to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var label = ui.createLabel();
});

Name: createButton
Type: function
Return type: UIButton

// add a button to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var button = ui.createButton();
});

Name: createRadioButton
Type: function
Return type: UIRadioButton
Argument 1: string

// add a radio button to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var group_ident = "my_buttons";
    var button1 = ui.createRadioButton(group_ident);
    var button2 = ui.createRadioButton(group_ident);
});

Name: createListBox
Type: function
Return type: UIListBox

// add a listbox to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var listbox = ui.createListBox();
});

Name: createComboBox
Type: function
Return type: UIComboBox

// add a combobox to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var combobox = ui.createComboBox();
});

Name: createImage
Type: function
Return type: UIImage

// add an image to your UI panel

Events.onload(function (ui)
{
    ui.create();
    var image = ui.createImage();
});

Last edited Feb 26, 2014 at 11:52 AM by oobenoob, version 6