private void TodoRemoveGroupField()
        {
            if (_selectedGroup == null || _showTodoGroup == false)
            {
                return;
            }

            if (GUILayout.Button("-", GUILayout.Height((float)TodoLayout.CreateGroupButtonHeight)))
            {
                _data.RemoveGroup(ref _selectedGroup);
                RefreshVisibleGroups();
                HideTodoGroup();
            }
        }
示例#2
0
        private void TodoRemoveGroupField()
        {
            if (_selectedGroup == null || _showTodoGroup == false)
            {
                return;
            }

            GUIContent content = new GUIContent("-", "Remove this " + _selectedGroup.tag.name + " asset");

            if (_selectedGroup.todos.Count > 0)
            {
                GUI.enabled     = false;
                content.tooltip = "Can't remove this asset because it has an item.";
            }

            if (GUILayout.Button(content, GUILayout.Height((float)TodoLayout.CreateGroupButtonHeight)))
            {
                _data.RemoveGroup(ref _selectedGroup);
                RefreshCurrentGroups();
                SetSelectedGroup(-1);
            }
            GUI.enabled = true;
        }