Ejemplo n.º 1
0
 protected static bool ActionButton(AuthorShared.Content content, ref AuthorShared.PeiceAction act, bool isSelected, AuthorShared.PeiceAction action, GUIStyle style, params GUILayoutOption[] options)
 {
     if (AuthorShared.Toggle(content, isSelected, style, options) == isSelected)
     {
         return(false);
     }
     act = action;
     return(true);
 }
Ejemplo n.º 2
0
    public virtual AuthorShared.PeiceAction PeiceListGUI()
    {
        bool flag = (AuthorShared.SelectionContains(this.selectReference) ? true : AuthorShared.SelectionContains(this));

        AuthorShared.PeiceAction peiceAction = AuthorShared.PeiceAction.None;
        AuthorShared.BeginHorizontal(new GUILayoutOption[0]);
        AuthorPeice.ActionButton(this.peiceID, ref peiceAction, flag, AuthorShared.PeiceAction.AddToSelection, AuthorShared.PeiceAction.RemoveFromSelection, AuthorShared.Styles.peiceButtonLeft, new GUILayoutOption[0]);
        AuthorPeice.ActionButton(AuthorShared.Icon.solo, ref peiceAction, flag, AuthorShared.PeiceAction.SelectSolo, AuthorShared.Styles.peiceButtonMid, new GUILayoutOption[] { GUILayout.ExpandWidth(false) });
        Color color = GUI.contentColor;

        GUI.contentColor = Color.red;
        AuthorPeice.ActionButton(AuthorShared.Icon.delete, ref peiceAction, flag, AuthorShared.PeiceAction.Delete, AuthorShared.Styles.peiceButtonRight, new GUILayoutOption[] { GUILayout.ExpandWidth(false) });
        GUI.contentColor = color;
        AuthorShared.EndHorizontal();
        return(peiceAction);
    }
Ejemplo n.º 3
0
    public virtual AuthorShared.PeiceAction PeiceListGUI()
    {
        bool isSelected = AuthorShared.SelectionContains(this.selectReference) || AuthorShared.SelectionContains(this);

        AuthorShared.PeiceAction none = AuthorShared.PeiceAction.None;
        AuthorShared.BeginHorizontal(new GUILayoutOption[0]);
        ActionButton(this.peiceID, ref none, isSelected, AuthorShared.PeiceAction.AddToSelection, AuthorShared.PeiceAction.RemoveFromSelection, AuthorShared.Styles.peiceButtonLeft, new GUILayoutOption[0]);
        GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
        ActionButton(AuthorShared.Icon.solo, ref none, isSelected, AuthorShared.PeiceAction.SelectSolo, AuthorShared.Styles.peiceButtonMid, options);
        Color contentColor = GUI.contentColor;

        GUI.contentColor = Color.red;
        GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
        ActionButton(AuthorShared.Icon.delete, ref none, isSelected, AuthorShared.PeiceAction.Delete, AuthorShared.Styles.peiceButtonRight, optionArray2);
        GUI.contentColor = contentColor;
        AuthorShared.EndHorizontal();
        return(none);
    }