private void TodoAddButton()
        {
            int originalButtonFontSize = GUI.skin.button.fontSize;

            GUI.skin.button.fontSize  = 18;
            GUI.skin.button.fontStyle = FontStyle.Bold;

            if (GUILayout.Button("+", GUILayout.Height(25f)))
            {
                string defaultName = _selectedGroup.tag.name + " " + (_selectedGroup.todos.Count + 1);
                Todo   todo        = new Todo(defaultName, "", _config.GetProgressByIndex(0), _config.GetPriorityByIndex(0), null);
                _selectedGroup.AddTodo(ref todo);
            }

            GUI.skin.button.fontSize  = originalButtonFontSize;
            GUI.skin.button.fontStyle = FontStyle.Normal;
        }
Example #2
0
        private void TodoAddButton()
        {
            int originalButtonFontSize = GUI.skin.button.fontSize;

            GUI.skin.button.fontSize  = 18;
            GUI.skin.button.fontStyle = FontStyle.Bold;
            GUIContent content = new GUIContent("+", "Create a new " + _selectedGroup.tag.name);

            if (GUILayout.Button(content, GUILayout.Height((float)TodoLayout.TodoAddButtonHeight)))
            {
                string defaultName = _selectedGroup.tag.name + " " + (_selectedGroup.todos.Count + 1);
                Todo   todo        = new Todo(defaultName, "", _config.GetProgressByIndex(1), _config.GetPriorityByIndex(1), null);
                _selectedGroup.AddTodo(ref todo);
            }

            GUI.skin.button.fontSize  = originalButtonFontSize;
            GUI.skin.button.fontStyle = FontStyle.Normal;
        }