Example #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);
            }
Example #2
0
 public void Reset()
 {
     m_visableRow        = Vector2.zero;
     m_visableCol        = Vector2.zero;
     m_draggablePanel    = null;
     m_currentItemIndex  = 0;
     m_lastItemIndex     = 0;
     itemlistInit        = false;
     delInitItemList     = null;
     delItemClicked      = null;
     delSelectChanged    = null;
     delItemDownClicked  = null;
     delItemLeftClicked  = null;
     delItemRightClicked = null;
     delItemUpClicked    = null;
     m_ItemList.Clear();
 }
Example #3
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);
 }