Value Changed Delegates

Overview
Almost all EZ GUI controls allow you to be notified when their values change by passing a delegate to the control's AddValueChangedDelegate() method. Such a delegate must conform to the EZInputDelegate definition:
void EZValueChangedDelegate(UIObject obj)
function EZValueChangedDelegate(obj : UIObject)
This delegate receives a reference to the control object the value of which has changed. This allows you to immediately respond when the value of a control is modified by the user.
Example
Let's see an example of how to get the value of multiple controls with a single function:
using UnityEngine;
using System.Collections;

public class Example : MonoBehaviour
{
    // The below references should be populated
    // by dragging the desired controls from
    // scene hierarchy onto these variables in
    // the inspector:

    // Reference to a slider
    public UISlider slider;

    // Reference to a radio button
    public UIRadioBtn radioBtn;

    void Start()
    {
        // Register our delegate with both controls:
        slider.AddValueChangedDelegate(MyDelegate);
        radioBtn.AddValueChangedDelegate(MyDelegate);
    }

    // The delegate itself
    void MyDelegate(IUIObject obj)
    {
        if(obj == slider)
            Debug.Log("The slider's value is: " + slider.Value);
        else if(obj == radioBtn)
            Debug.Log("The radio button's value is: " + radioBtn.Value);
    }
}
// The below references should be populated
// by dragging the desired controls from
// scene hierarchy onto these variables in
// the inspector:

// Reference to a slider
var slider : UISlider;

// Reference to a radio button
var radioBtn : UIRadioBtn;

function Start()
{
    // Register our delegate with both controls:
    slider.AddValueChangedDelegate(MyDelegate);
    radioBtn.AddValueChangedDelegate(MyDelegate);
}

// The delegate itself
function MyDelegate(obj : IUIObject)
{
    if(obj == slider)
        Debug.Log("The slider's value is: " + slider.Value);
    else if(obj == radioBtn)
        Debug.Log("The radio button's value is: " + radioBtn.Value);
}
This delegate receives a reference to the control object the value of which has changed. This allows you to immediately respond when the value of a control is modified by the user.