/*public bool ThoriumModDownedScout
         * {
         *      get { return ThoriumMod.ThoriumWorld.downedScout; }
         * }
         * public bool CalamityDS => CalamityMod.CalamityWorld.downedDesertScourge;*/

        internal void UpdateCheckboxes()
        {
            checklistList.Clear();

            foreach (BossInfo boss in BossChecklist.bossTracker.allBosses)
            {
                boss.hidden = BossChecklistWorld.HiddenBosses.Contains(boss.name);
                if (boss.available() && (!boss.hidden || showHidden))
                {
                    if (showCompleted || !boss.downed())
                    {
                        if (boss.type == BossChecklistType.Event && !showEvent)
                        {
                            continue;
                        }
                        if (boss.type == BossChecklistType.MiniBoss && !showMiniBoss)
                        {
                            continue;
                        }
                        UIBossCheckbox box = new UIBossCheckbox(boss);
                        checklistList.Add(box);
                    }
                }
            }

            //if (BossChecklist.instance.thoriumLoaded)
            //{
            //	if (ThoriumModDownedScout)
            //	{
            //		// Add items here
            //	}
            //}
        }
Exemple #2
0
        private void Box_OnClick(UIMouseEvent evt, UIElement listeningElement)
        {
            if (Main.keyState.IsKeyDown(Keys.LeftAlt) || Main.keyState.IsKeyDown(Keys.RightAlt))
            {
                boss.hidden = !boss.hidden;
                if (boss.hidden)
                {
                    BossChecklistWorld.HiddenBosses.Add(boss.name);
                }
                else
                {
                    BossChecklistWorld.HiddenBosses.Remove(boss.name);
                }
                BossChecklist.instance.bossChecklistUI.UpdateCheckboxes();
                if (Main.netMode == NetmodeID.MultiplayerClient)
                {
                    ModPacket packet = BossChecklist.instance.GetPacket();
                    packet.Write((byte)BossChecklistMessageType.RequestHideBoss);
                    packet.Write(boss.name);
                    packet.Write(boss.hidden);
                    packet.Send();
                }
                return;
            }

            UIBossCheckbox clicked = listeningElement as UIBossCheckbox;

            foreach (var item in BossChecklist.instance.bossChecklistUI.checklistList._items)
            {
                UIBossCheckbox box = (item as UIBossCheckbox);
                if (box != clicked)
                {
                    box.expanded      = false;
                    box.Height.Pixels = 15;
                    box.Recalculate();
                }
            }

            expanded      = !expanded;
            Height.Pixels = expanded ? 15 + descriptionHeight : 15;
            Recalculate();
        }
Exemple #3
0
        public override int CompareTo(object obj)
        {
            UIBossCheckbox other = obj as UIBossCheckbox;

            return(boss.progression.CompareTo(other.boss.progression));
        }