Пример #1
0
 static HxBadge()
 {
     Defaults = new BadgeSettings()
     {
         Color     = null,
         TextColor = ThemeColor.None,
         Type      = BadgeType.Regular,
         CssClass  = null
     };
 }
Пример #2
0
        public void TestShieldGeometry()
        {
            var settings = new BadgeSettings
            {
                ShieldGeometry = new Tuple <int, int>(100, -20),
            };

            var builder = settings.Evaluate();
            var built   = builder.Render();

            Assert.Contains("--shield_geometry +100-20%", built);
        }
Пример #3
0
 static HxInputTags()
 {
     Defaults = new InputTagsSettings()
     {
         InputSize            = Bootstrap.InputSize.Regular,
         SuggestMinimumLength = 2,
         SuggestDelay         = 300,
         Delimiters           = new() { ',', ';', ' ' },
         ShowAddButton        = false,
         TagBadgeSettings     = new BadgeSettings()
         {
             Color     = ThemeColor.Light,
             TextColor = ThemeColor.Dark,
         }
     };
 }
Пример #4
0
        public static void Update(DownloadItemTemplatesResponse templatesResponse)
        {
            RepeatedField <ItemTemplate> templates = templatesResponse.ItemTemplates;

            PokemonMeta.templates.Clear();
            PokemonMeta.templates.AddRange(templates);
            foreach (ItemTemplate template in templates)
            {
                if (template.PokemonSettings != null)
                {
                    PokemonSettings pokemonSettings = template.PokemonSettings;
                    PokemonSettings[pokemonSettings.PokemonId] = pokemonSettings;
                }
                else if (template.MoveSettings != null)
                {
                    MoveSettings moveSettings = template.MoveSettings;
                    MoveSettings[moveSettings.MovementId] = moveSettings;
                }
                else if (template.BadgeSettings != null)
                {
                    BadgeSettings badgeSettings = template.BadgeSettings;
                    BadgeSettings[badgeSettings.BadgeType] = badgeSettings;
                }
                else if (template.ItemSettings != null)
                {
                    ItemSettings itemSettings = template.ItemSettings;
                    ItemSettings[itemSettings.ItemId] = itemSettings;
                }
                else if (template.BattleSettings != null)
                {
                    BattleSettings = template.BattleSettings;
                }
                else if (template.PokemonUpgrades != null)
                {
                    UpgradeSettings = template.PokemonUpgrades;
                }
            }
            //Evolutions.initialize(templates);
            PokemonCpUtils.Initialize(templates);
        }