private void SetPanel()
        {
            foreach (var panel in Config.Instance.DeckPanelOrderOpponent)
            {
                switch (panel)
                {
                case Enums.DeckPanel.Winrate:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, Config.Instance.ShowWinRateAgainst,
                                                                        value => Config.Instance.ShowWinRateAgainst = value, false));
                    break;

                case Enums.DeckPanel.Cards:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, !Config.Instance.HideOpponentCards,
                                                                        value => Config.Instance.HideOpponentCards = !value, false));
                    break;

                case Enums.DeckPanel.CardCounter:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, !Config.Instance.HideOpponentCardCount,
                                                                        value => Config.Instance.HideOpponentCardCount = !value, false));
                    break;

                case Enums.DeckPanel.DrawChances:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, !Config.Instance.HideOpponentDrawChances,
                                                                        value => Config.Instance.HideOpponentDrawChances = !value, false));
                    break;

                case Enums.DeckPanel.Fatigue:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, !Config.Instance.HideOpponentFatigueCount,
                                                                        value => Config.Instance.HideOpponentFatigueCount = !value, false));
                    break;
                }
            }
        }
Exemple #2
0
        public void Load(GameV2 game)
        {
            _game = game;
            CheckboxHighlightDiscarded.IsChecked   = Config.Instance.HighlightDiscarded;
            SliderOpponentOpacity.Value            = Config.Instance.OpponentOpacity;
            SliderOverlayOpponentScaling.Value     = Config.Instance.OverlayOpponentScaling;
            CheckboxSameScaling.IsChecked          = Config.Instance.UseSameScaling;
            SliderSecretOpacity.Value              = Config.Instance.SecretsOpacity;
            CheckBoxCenterDeckVertically.IsChecked = Config.Instance.OverlayCenterOpponentStackPanel;
            CheckboxIncludeCreated.IsChecked       = Config.Instance.OpponentIncludeCreated;
            CheckBoxAttack.IsChecked                = !Config.Instance.HideOpponentAttackIcon;
            ComboBoxCthun.ItemsSource               = Enum.GetValues(typeof(DisplayMode)).Cast <DisplayMode>();
            ComboBoxCthun.SelectedItem              = Config.Instance.OpponentCthunCounter;
            ComboBoxSpells.ItemsSource              = new[] { DisplayMode.Always, DisplayMode.Never };
            ComboBoxSpells.SelectedItem             = Config.Instance.OpponentSpellsCounter;
            ComboBoxJade.ItemsSource                = Enum.GetValues(typeof(DisplayMode)).Cast <DisplayMode>();
            ComboBoxJade.SelectedItem               = Config.Instance.OpponentJadeCounter;
            CheckboxHideOpponentCardAge.IsChecked   = Config.Instance.HideOpponentCardAge;
            CheckboxHideOpponentCardMarks.IsChecked = Config.Instance.HideOpponentCardMarks;
            CheckboxHideSecrets.IsChecked           = Config.Instance.HideSecrets;

            ElementSorterOpponent.IsPlayer = false;
            foreach (var panel in Config.Instance.DeckPanelOrderOpponent)
            {
                switch (panel)
                {
                case Enums.DeckPanel.Winrate:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, Config.Instance.ShowWinRateAgainst,
                                                                        value => Config.Instance.ShowWinRateAgainst = value, false));
                    break;

                case Enums.DeckPanel.Cards:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, !Config.Instance.HideOpponentCards,
                                                                        value => Config.Instance.HideOpponentCards = !value, false));
                    break;

                case Enums.DeckPanel.CardCounter:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, !Config.Instance.HideOpponentCardCount,
                                                                        value => Config.Instance.HideOpponentCardCount = !value, false));
                    break;

                case Enums.DeckPanel.DrawChances:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, !Config.Instance.HideOpponentDrawChances,
                                                                        value => Config.Instance.HideOpponentDrawChances = !value, false));
                    break;

                case Enums.DeckPanel.Fatigue:
                    ElementSorterOpponent.AddItem(new ElementSorterItem(panel, !Config.Instance.HideOpponentFatigueCount,
                                                                        value => Config.Instance.HideOpponentFatigueCount = !value, false));
                    break;
                }
            }
            Core.Overlay.UpdateOpponentLayout();
            Core.Windows.OpponentWindow.UpdateOpponentLayout();
            _initialized = true;
        }
Exemple #3
0
        public void Load(GameV2 game)
        {
            _game = game;
            CheckboxHighlightDiscarded.IsChecked   = Config.Instance.HighlightDiscarded;
            SliderOpponentOpacity.Value            = Config.Instance.OpponentOpacity;
            SliderOverlayOpponentScaling.Value     = Config.Instance.OverlayOpponentScaling;
            CheckboxSameScaling.IsChecked          = Config.Instance.UseSameScaling;
            SliderSecretOpacity.Value              = Config.Instance.SecretsOpacity;
            CheckBoxCenterDeckVertically.IsChecked = Config.Instance.OverlayCenterOpponentStackPanel;
            CheckboxIncludeCreated.IsChecked       = Config.Instance.OpponentIncludeCreated;

            ElementSorterOpponent.IsPlayer = false;
            foreach (var itemName in Config.Instance.PanelOrderOpponent)
            {
                switch (itemName)
                {
                case "Cards":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Cards", !Config.Instance.HideOpponentCards,
                                                                        value => Config.Instance.HideOpponentCards = !value, false));
                    break;

                case "Card Counter":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Card Counter", !Config.Instance.HideOpponentCardCount,
                                                                        value => Config.Instance.HideOpponentCardCount = !value, false));
                    break;

                case "Fatigue Counter":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Fatigue Counter", !Config.Instance.HideOpponentFatigueCount,
                                                                        value => Config.Instance.HideOpponentFatigueCount = !value, false));
                    break;

                case "Draw Chances":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Draw Chances", !Config.Instance.HideOpponentDrawChances,
                                                                        value => Config.Instance.HideOpponentDrawChances = !value, false));
                    break;

                case "Win Rate":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Win Rate", Config.Instance.ShowWinRateAgainst,
                                                                        value => Config.Instance.ShowWinRateAgainst = value, false));
                    break;
                }
            }
            Core.Overlay.UpdateOpponentLayout();
            Core.Windows.OpponentWindow.UpdateOpponentLayout();
            _initialized = true;
        }
        public void Load()
        {
            CheckboxHighlightDiscarded.IsChecked = Config.Instance.HighlightDiscarded;
            SliderOpponentOpacity.Value          = Config.Instance.OpponentOpacity;
            SliderOverlayOpponentScaling.Value   = Config.Instance.OverlayOpponentScaling;
            CheckboxSameScaling.IsChecked        = Config.Instance.UseSameScaling;

            ElementSorterOpponent.IsPlayer = false;
            foreach (var itemName in Config.Instance.PanelOrderOpponent)
            {
                switch (itemName)
                {
                case "Cards":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Cards", !Config.Instance.HideOpponentCards,
                                                                        value => Config.Instance.HideOpponentCards = !value, false));
                    break;

                case "Card Counter":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Card Counter", !Config.Instance.HideOpponentCardCount,
                                                                        value => Config.Instance.HideOpponentCardCount = !value, false));
                    break;

                case "Fatigue Counter":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Fatigue Counter", !Config.Instance.HideOpponentFatigueCount,
                                                                        value => Config.Instance.HideOpponentFatigueCount = !value, false));
                    break;

                case "Draw Chances":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Draw Chances", !Config.Instance.HideOpponentDrawChances,
                                                                        value => Config.Instance.HideOpponentDrawChances = !value, false));
                    break;

                case "Win Rate":
                    ElementSorterOpponent.AddItem(new ElementSorterItem("Win Rate", Config.Instance.ShowWinRateAgainst,
                                                                        value => Config.Instance.ShowWinRateAgainst = value, false));
                    break;
                }
            }
            Helper.MainWindow.Overlay.UpdateOpponentLayout();
            Helper.MainWindow.OpponentWindow.UpdateOpponentLayout();
            _initialized = true;
        }