Пример #1
0
 private static Color BadgeToColor(UIMenuItem.BadgeInfo badge, bool selected)
 {
     if (badge.ApplyForeColor)
     {
         return(selected ? Color.FromArgb(255, 0, 0, 0) : Color.FromArgb(255, 255, 255, 255));
     }
     else
     {
         return(Color.FromArgb(255, 255, 255, 255));
     }
 }
Пример #2
0
        private static bool BadgeToSprite(UIMenuItem.BadgeInfo badge, bool selected, out string txd, out string tex)
        {
            badge.GetTexture(selected, out txd, out tex);
            if (badge.Style == UIMenuItem.BadgeStyle.Custom)
            {
                N.RequestStreamedTextureDict(txd);
                if (!N.HasStreamedTextureDictLoaded(txd))
                {
                    return(false);
                }
            }

            return(true);
        }