Ejemplo n.º 1
0
            private void DoEnterProcess(object sender, EventArgs e)
            {
                foreach (RichTextItem rti in Items)
                {
                    rti.Selected = false;
                }

                _selected            = true;
                BackGround.BackColor = SelColor;
                Head.BackColor       = SelColor;


                OnSelectChanged?.Invoke(sender, e, this);
            }
Ejemplo n.º 2
0
    public static void DrawToolbar(string key, string[] titles, int defaultValue = 0, OnSelectChanged onClick = null, GUIStyle uIStyle = null, params GUILayoutOption[] option)
    {
        GUILayout.BeginHorizontal();
        int select = defaultValue;

        if (!cacheIntState.ContainsKey(key))
        {
            cacheIntState.Add(key, select);
        }
        else
        {
            select = cacheIntState[key];
        }
        cacheIntState[key] = uIStyle == null?GUILayout.Toolbar(select, titles, option) : GUILayout.Toolbar(select, titles, uIStyle, option);

        if (select != cacheIntState[key])
        {
            onClick?.Invoke(cacheIntState[key]);
            GUIUtility.ExitGUI();
        }
        GUILayout.EndHorizontal();
    }
 internal void SetSelectNull(SearchButtonEdit col)
 {
     OnSelectChanged?.Invoke(col, null);
 }