Пример #1
0
    protected GUIBase_Button PrepareButton(string inName,
                                           GUIBase_Button.TouchDelegate2 inTouchDlgt,
                                           GUIBase_Button.ReleaseDelegate2 inReleaseDlgt,
                                           bool inAutoColorLabels,
                                           bool inStayDown)
    {
        GUIBase_Button b = PrepareButton(m_ScreenLayout, inName, inTouchDlgt, inReleaseDlgt);

        if (b != null)
        {
            b.autoColorLabels = inAutoColorLabels;
            b.stayDown        = inStayDown;
        }
        return(b);
    }
Пример #2
0
 //---------------------------------------------------------
 public static void RegisterButtonDelegate(GUIBase_Button button,
                                           GUIBase_Button.TouchDelegate2 touch,
                                           GUIBase_Button.ReleaseDelegate2 release,
                                           GUIBase_Button.CancelDelegate2 cancel)
 {
     if (button != null)
     {
         button.RegisterTouchDelegate2(touch);
         button.RegisterReleaseDelegate2(release);
         button.RegisterCancelDelegate2(cancel);
     }
     else
     {
         Debug.LogError("Invalid agrument - button (null) ");
     }
 }
Пример #3
0
    protected GUIBase_Button PrepareButton(GUIBase_Layout inLayout,
                                           string inName,
                                           GUIBase_Button.TouchDelegate2 inTouchDlgt,
                                           GUIBase_Button.ReleaseDelegate2 inRreleaseDlgt)
    {
        GUIBase_Button button = GetWidget(inLayout, inName).GetComponent <GUIBase_Button>();

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

        button.RegisterTouchDelegate2(inTouchDlgt);
        button.RegisterReleaseDelegate2(inRreleaseDlgt);
        return(button);
    }
Пример #4
0
    //---------------------------------------------------------
    public static GUIBase_Button RegisterButtonDelegate(GUIBase_Layout layout,
                                                        string buttonName,
                                                        GUIBase_Button.TouchDelegate2 touch,
                                                        GUIBase_Button.ReleaseDelegate2 release,
                                                        GUIBase_Button.CancelDelegate2 cancel)
    {
        GUIBase_Button control = GetControl <GUIBase_Button>(layout, buttonName);

        if (control != null)
        {
            RegisterButtonDelegate(control, touch, release, cancel);
        }
        else
        {
            Debug.LogError("Can't find button '" + buttonName);
        }
        return(control);
    }
Пример #5
0
 protected GUIBase_Button PrepareButton(string inName,
                                        GUIBase_Button.TouchDelegate2 inTouchDlgt,
                                        GUIBase_Button.ReleaseDelegate2 inReleaseDlgt)
 {
     return(PrepareButton(m_ScreenLayout, inName, inTouchDlgt, inReleaseDlgt));
 }