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); }
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(); }
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); }