예제 #1
0
    /*
    public MyGUI(GUISkin guiSkin)
    {
        if(guiSkin == null)
        {
            setDefault();
        }
        else
        {
            mGUISkin = guiSkin;
        }
    }

    public MyGUI()
    {
        setDefault();
    }

    private void setDefault()
    {
        mGUISkin = MyGUIBehavior.Instance.skin;
        //mGuiContent = MyGUIBehavior.Instance.mGuiContent;
        //mOriginalColor = MyGUIBehavior.DefaultMyGUI.mOriginalColor;
    }
     */

    /// <summary>
    /// Add GUICall
    /// </summary>
    /// <param name="guiCallback"></param>
    /// <param name="callPriority"></param>
    public  void AddGUICall(OnGUICallback guiCallback, GUICallPriority callPriority)
    {
        switch (callPriority)
        {
            case GUICallPriority.top:
                AddTopGUICall(guiCallback);
                break;
            case GUICallPriority.background:
                AddBackgroundGUICall(guiCallback);
                break;
            default:
                AddTopGUICall(guiCallback);
                break;
        }
    }
예제 #2
0
    /*
     * public MyGUI(GUISkin guiSkin)
     * {
     *  if(guiSkin == null)
     *  {
     *      setDefault();
     *  }
     *  else
     *  {
     *      mGUISkin = guiSkin;
     *  }
     * }
     *
     * public MyGUI()
     * {
     *  setDefault();
     * }
     *
     * private void setDefault()
     * {
     *  mGUISkin = MyGUIBehavior.Instance.skin;
     *  //mGuiContent = MyGUIBehavior.Instance.mGuiContent;
     *  //mOriginalColor = MyGUIBehavior.DefaultMyGUI.mOriginalColor;
     * }
     */

    /// <summary>
    /// Add GUICall
    /// </summary>
    /// <param name="guiCallback"></param>
    /// <param name="callPriority"></param>
    public void AddGUICall(OnGUICallback guiCallback, GUICallPriority callPriority)
    {
        switch (callPriority)
        {
        case GUICallPriority.top:
            AddTopGUICall(guiCallback);
            break;

        case GUICallPriority.background:
            AddBackgroundGUICall(guiCallback);
            break;

        default:
            AddTopGUICall(guiCallback);
            break;
        }
    }
예제 #3
0
    /// <summary>
    /// Remove GUI call
    /// </summary>
    /// <param name="guiCallback"></param>
    /// <param name="callPriority"></param>
    public void RemoveGUICall(OnGUICallback guiCallback, GUICallPriority callPriority)
    {
        Debug.Log("  RemoveGUICall in myGUI - " + this.GetHashCode());
        switch (callPriority)
        {
        case GUICallPriority.top:
            RemoveTopGUICall(guiCallback);
            break;

        case GUICallPriority.background:
            RemoveBackgroundGUICall(guiCallback);
            break;

        default:
            RemoveTopGUICall(guiCallback);
            break;
        }
    }
예제 #4
0
 /// <summary>
 /// Remove GUI call
 /// </summary>
 /// <param name="guiCallback"></param>
 /// <param name="callPriority"></param>
 public void RemoveGUICall(OnGUICallback guiCallback, GUICallPriority callPriority)
 {
     Debug.Log("  RemoveGUICall in myGUI - " + this.GetHashCode());
     switch (callPriority)
     {
         case GUICallPriority.top:
             RemoveTopGUICall(guiCallback);
             break;
         case GUICallPriority.background:
             RemoveBackgroundGUICall(guiCallback);
             break;
         default:
             RemoveTopGUICall(guiCallback);
             break;
     }
 }