Exemplo n.º 1
0
    protected GUIBase_Switch PrepareSwitch(GUIBase_Layout inLayout, string inName, GUIBase_Switch.SwitchDelegate inSwitchDlgt)
    {
        GUIBase_Switch _switch = GetWidget(inLayout, inName).GetComponent <GUIBase_Switch>();

        if (_switch == null)
        {
            throw new MFScreenInitException("Widget [ " + inName + " } dosn't have switch component");
        }

        _switch.RegisterDelegate(inSwitchDlgt);
        return(_switch);
    }
Exemplo n.º 2
0
    //---------------------------------------------------------
    public static GUIBase_Switch RegisterSwitchDelegate(GUIBase_Layout layout, string switchName, GUIBase_Switch.SwitchDelegate d)
    {
        GUIBase_Switch control = GetControl <GUIBase_Switch>(layout, switchName);

        if (control != null)
        {
            control.RegisterDelegate(d);
        }
        else
        {
            Debug.LogError("Can't find switch '" + switchName + "'");
        }
        return(control);
    }
Exemplo n.º 3
0
 protected GUIBase_Switch RegisterSwitchDelegate(string inName, GUIBase_Switch.SwitchDelegate inSwitchDlgt)
 {
     return(PrepareSwitch(m_ScreenLayout, inName, inSwitchDlgt));
 }