Ejemplo n.º 1
0
        /// <summary>
        ///     Gets a chat badge icon based on user groups.
        /// </summary>
        /// <param name="groups"></param>
        /// <returns></returns>
        public static Texture2D GetIcon(UserGroups groups)
        {
            if (groups.HasFlag(UserGroups.Developer))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_code));
            }

            // Bot
            if (groups.HasFlag(UserGroups.Bot))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_open_wrench_tool_silhouette));
            }

            // Admin
            if (groups.HasFlag(UserGroups.Admin))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_legal_hammer));
            }

            if (groups.HasFlag(UserGroups.Moderator))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_ban_circle_symbol));
            }

            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Returns the user group's name stringified.
        /// </summary>
        /// <param name="groups"></param>
        /// <returns></returns>
        public static string GetUserGroupName(UserGroups groups)
        {
            if (groups.HasFlag(UserGroups.Developer))
            {
                return("Developer");
            }

            // Bot
            if (groups.HasFlag(UserGroups.Bot))
            {
                return("Bot");
            }

            // Admin
            if (groups.HasFlag(UserGroups.Admin))
            {
                return("Administrator");
            }

            // Mod
            if (groups.HasFlag(UserGroups.Moderator))
            {
                return("Moderator");
            }

            return(null);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Gets the chat color of a given user
        /// </summary>
        /// <param name="userGroups"></param>
        /// <returns></returns>
        public static Color GetUserChatColor(UserGroups userGroups)
        {
            if (userGroups.HasFlag(UserGroups.Developer))
            {
                return(Swan);
            }
            if (userGroups.HasFlag(UserGroups.Bot))
            {
                return(ColorHelper.HexToColor($"#f8ff97"));
            }
            if (userGroups.HasFlag(UserGroups.Admin))
            {
                return(MainAccent);
            }
            if (userGroups.HasFlag(UserGroups.Moderator))
            {
                return(ColorHelper.HexToColor($"#9d84ec"));
            }
            if (userGroups.HasFlag(UserGroups.Normal))
            {
                return(Color.White);
            }

            return(Color.White);
        }
Ejemplo n.º 4
0
        /// <summary>
        ///     Gets the chat color of a given user
        /// </summary>
        /// <param name="userGroups"></param>
        /// <returns></returns>
        public static Color GetUserChatColor(UserGroups userGroups)
        {
            if (userGroups.HasFlag(UserGroups.Swan))
            {
                return(Swan);
            }
            if (userGroups.HasFlag(UserGroups.Developer))
            {
                return(ColorHelper.HexToColor("#bb79e5"));
            }
            if (userGroups.HasFlag(UserGroups.Bot))
            {
                return(ColorHelper.HexToColor($"#f8ff97"));
            }
            if (userGroups.HasFlag(UserGroups.Admin))
            {
                return(ColorHelper.HexToColor($"#708df9"));
            }
            if (userGroups.HasFlag(UserGroups.Moderator))
            {
                return(ColorHelper.HexToColor($"#4cb0f7"));
            }
            if (userGroups.HasFlag(UserGroups.RankingSupervisor))
            {
                return(ColorHelper.HexToColor($"#49e6ef"));
            }
            if (userGroups.HasFlag(UserGroups.Normal))
            {
                return(Color.White);
            }

            return(Color.White);
        }
Ejemplo n.º 5
0
        /// <summary>
        ///     Returns the user group's name stringified.
        /// </summary>
        /// <param name="groups"></param>
        /// <returns></returns>
        public static string GetUserGroupName(UserGroups groups)
        {
            if (groups.HasFlag(UserGroups.Swan))
            {
                return("Swan");
            }

            if (groups.HasFlag(UserGroups.Developer))
            {
                return("Developer");
            }

            // Bot
            if (groups.HasFlag(UserGroups.Bot))
            {
                return("Bot");
            }

            // Admin
            if (groups.HasFlag(UserGroups.Admin))
            {
                return("Administrator");
            }

            // Mod
            if (groups.HasFlag(UserGroups.Moderator))
            {
                return("Moderator");
            }

            if (groups.HasFlag(UserGroups.RankingSupervisor))
            {
                return("Ranking Supervisor");
            }

            if (groups.HasFlag(UserGroups.Contributor))
            {
                return("Contributor");
            }

            if (groups.HasFlag(UserGroups.Donator))
            {
                return("Donator");
            }

            return(null);
        }
Ejemplo n.º 6
0
        /// <summary>
        ///     Gets a chat badge icon based on user groups.
        /// </summary>
        /// <param name="groups"></param>
        /// <returns></returns>
        public static Texture2D GetIcon(UserGroups groups)
        {
            if (groups.HasFlag(UserGroups.Swan))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_anchor_shape));
            }

            if (groups.HasFlag(UserGroups.Developer))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_code));
            }

            // Bot
            if (groups.HasFlag(UserGroups.Bot))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_open_wrench_tool_silhouette));
            }

            // Admin
            if (groups.HasFlag(UserGroups.Admin))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_legal_hammer));
            }

            if (groups.HasFlag(UserGroups.Moderator))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_ban_circle_symbol));
            }

            if (groups.HasFlag(UserGroups.RankingSupervisor))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_music_note_black_symbol));
            }

            if (groups.HasFlag(UserGroups.Contributor))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_open_wrench_tool_silhouette));
            }

            if (groups.HasFlag(UserGroups.Donator))
            {
                return(FontAwesome.Get(FontAwesomeIcon.fa_heart_shape_silhouette));
            }

            return(null);
        }