コード例 #1
0
 //---------------------------------------------------------
 public static void RegisterButtonDelegate3(GUIBase_Button button,
                                            GUIBase_Button.TouchDelegate3 touch,
                                            GUIBase_Button.TouchDelegate3 release,
                                            GUIBase_Button.TouchDelegate3 cancel)
 {
     if (button != null)
     {
         button.RegisterTouchDelegate3(touch);
         button.RegisterReleaseDelegate3(release);
         button.RegisterCancelDelegate3(cancel);
     }
     else
     {
         Debug.LogError("Invalid agrument - button (null)");
     }
 }
コード例 #2
0
    //---------------------------------------------------------
    public static void RegisterButtonDelegate3(GUIBase_Layout layout,
                                               string buttonName,
                                               GUIBase_Button.TouchDelegate3 touch,
                                               GUIBase_Button.TouchDelegate3 release,
                                               GUIBase_Button.TouchDelegate3 cancel)
    {
        GUIBase_Button control = GetControl <GUIBase_Button>(layout, buttonName);

        if (control != null)
        {
            RegisterButtonDelegate3(control, touch, release, cancel);
        }
        else
        {
            Debug.LogError("Can't find button '" + buttonName + "'");
        }
    }