//---------------------------------------------------------------------------------- public CRListBox(IListController controller, string dragDropIdentifier, bool isTreeList) { Controller = controller; Focused = true; dragDropIdentifier_ = dragDropIdentifier; CurrentMouseDragItem = -1; draggingItemIdx_ = -1; isDragging_ = false; itemHeight_ = 20.0f; itemEditedClicked_ = false; dragOverAnyItem_ = false; isTreeList_ = isTreeList; if (!isTreeList_) { toggleWidth_ = 0f; } currentGUIColor_ = GUI.color; currentContentColor_ = GUI.contentColor; backgroundColor_ = Color.white; bool isPro = UnityEditorInternal.InternalEditorUtility.HasPro(); if (isPro) { focusedSelectedItemColor_ = Color.blue; unfocusedSelectedItemColor_ = new Color(0.5f, 0.5f, 0.5f, 0.3f); dragToItemColor_ = new Color(0.4f, 0.4f, 0f); textColorUnselected_ = new Color(0.8f, 0.8f, 0.8f, 1.0f); textColorSelected_ = Color.white; } else { focusedSelectedItemColor_ = new Color(205f / 255f, 1.0f, 195f / 255f, 1.0f); unfocusedSelectedItemColor_ = new Color(0.70f, 0.70f, 0.70f, 1.0f); dragToItemColor_ = new Color(153f / 255f, 204f / 255f, 1.0f, 1.0f); textColorUnselected_ = Color.black; textColorSelected_ = Color.black; } textFieldStyle_.alignment = TextAnchor.LowerLeft; foldoutStyle_.active = EditorStyles.label.normal; foldoutStyle_.focused = EditorStyles.label.normal; foldoutStyle_.onActive = EditorStyles.label.onNormal; foldoutStyle_.onFocused = EditorStyles.label.onNormal; foldoutStyle_.alignment = TextAnchor.LowerLeft; iconStyle_.alignment = TextAnchor.MiddleCenter; iconStyle_.margin = new RectOffset(); }
public AddToListForm(IListController controller) { this.controller = controller; InitializeComponent(); }
public void setController(IListController controller) { this.controller = controller; }