예제 #1
0
        public override void receiveLeftClick(int x, int y, bool playSound = true)
        {
            if (_button.containsPoint(x, y) && !_clicked)
            {
                _clicked = true;
                Game1.playSound("newArtifact");
                var list = Options.Where(o => o is ModManagerCheckBox opt && opt.IsChecked)
                           .Select(o => o.ModId)
                           .ToList();
                var name = ((ModManagerAddNameTextBox)Options[0]).Text;
                if (string.IsNullOrEmpty(name) || list.Count < 1)
                {
                    _clicked = false;
                    return;
                }
                ModManager.AddModPack(list, name);
                return;
            }

            base.receiveLeftClick(x, y, playSound);
        }