public void Load(GameV2 game)
        {
            _game = game;
            CheckboxHighlightCardsInHand.IsChecked = Config.Instance.HighlightCardsInHand;
            CheckboxRemoveCards.IsChecked          = Config.Instance.RemoveCardsFromDeck;
            CheckboxHighlightLastDrawn.IsChecked   = Config.Instance.HighlightLastDrawn;
            CheckboxShowPlayerGet.IsChecked        = Config.Instance.ShowPlayerGet;
            SliderPlayerOpacity.Value        = Config.Instance.PlayerOpacity;
            SliderOverlayPlayerScaling.Value = Config.Instance.OverlayPlayerScaling;
            TextBoxScaling.Text                    = Config.Instance.OverlayPlayerScaling.ToString(CultureInfo.InvariantCulture);
            CheckboxSameScaling.IsChecked          = Config.Instance.UseSameScaling;
            CheckBoxCenterDeckVertically.IsChecked = Config.Instance.OverlayCenterPlayerStackPanel;
            CheckBoxAttack.IsChecked               = !Config.Instance.HidePlayerAttackIcon;
            ComboBoxCthun.ItemsSource              = Enum.GetValues(typeof(DisplayMode)).Cast <DisplayMode>();
            ComboBoxCthun.SelectedItem             = Config.Instance.PlayerCthunCounter;
            ComboBoxSpells.ItemsSource             = Enum.GetValues(typeof(DisplayMode)).Cast <DisplayMode>();
            ComboBoxSpells.SelectedItem            = Config.Instance.PlayerSpellsCounter;
            ComboBoxJade.ItemsSource               = Enum.GetValues(typeof(DisplayMode)).Cast <DisplayMode>();
            ComboBoxJade.SelectedItem              = Config.Instance.PlayerJadeCounter;

            ElementSorterPlayer.IsPlayer = true;
            foreach (var panel in Config.Instance.DeckPanelOrderPlayer)
            {
                switch (panel)
                {
                case Enums.DeckPanel.Cards:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, !Config.Instance.HidePlayerCards,
                                                                      value => Config.Instance.HidePlayerCards = !value, true));
                    break;

                case Enums.DeckPanel.CardCounter:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, !Config.Instance.HidePlayerCardCount,
                                                                      value => Config.Instance.HidePlayerCardCount = !value, true));
                    break;

                case Enums.DeckPanel.DrawChances:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, !Config.Instance.HideDrawChances,
                                                                      value => Config.Instance.HideDrawChances = !value, true));
                    break;

                case Enums.DeckPanel.Fatigue:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, !Config.Instance.HidePlayerFatigueCount,
                                                                      value => Config.Instance.HidePlayerFatigueCount = !value, true));
                    break;

                case Enums.DeckPanel.DeckTitle:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, Config.Instance.ShowDeckTitle,
                                                                      value => Config.Instance.ShowDeckTitle = value, true));
                    break;

                case Enums.DeckPanel.Wins:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, Config.Instance.ShowDeckWins,
                                                                      value => Config.Instance.ShowDeckWins = value, true));
                    break;
                }
            }
            _initialized = true;
        }
Exemplo n.º 2
0
        public void Load(GameV2 game)
        {
            _game = game;
            CheckboxHighlightCardsInHand.IsChecked = Config.Instance.HighlightCardsInHand;
            CheckboxRemoveCards.IsChecked          = Config.Instance.RemoveCardsFromDeck;
            CheckboxHighlightLastDrawn.IsChecked   = Config.Instance.HighlightLastDrawn;
            CheckboxShowPlayerGet.IsChecked        = Config.Instance.ShowPlayerGet;
            SliderPlayerOpacity.Value        = Config.Instance.PlayerOpacity;
            SliderOverlayPlayerScaling.Value = Config.Instance.OverlayPlayerScaling;
            TextBoxScaling.Text           = Config.Instance.OverlayPlayerScaling.ToString(CultureInfo.InvariantCulture);
            CheckboxSameScaling.IsChecked = Config.Instance.UseSameScaling;

            ElementSorterPlayer.IsPlayer = true;
            foreach (var itemName in Config.Instance.PanelOrderPlayer)
            {
                switch (itemName)
                {
                case "Deck Title":
                    ElementSorterPlayer.AddItem(new ElementSorterItem("Deck Title", Config.Instance.ShowDeckTitle,
                                                                      value => Config.Instance.ShowDeckTitle = value, true));
                    break;

                case "Cards":
                    ElementSorterPlayer.AddItem(new ElementSorterItem("Cards", !Config.Instance.HidePlayerCards,
                                                                      value => Config.Instance.HidePlayerCards = !value, true));
                    break;

                case "Card Counter":
                    ElementSorterPlayer.AddItem(new ElementSorterItem("Card Counter", !Config.Instance.HidePlayerCardCount,
                                                                      value => Config.Instance.HidePlayerCardCount = !value, true));
                    break;

                case "Fatigue Counter":
                    ElementSorterPlayer.AddItem(new ElementSorterItem("Fatigue Counter", !Config.Instance.HidePlayerFatigueCount,
                                                                      value => Config.Instance.HidePlayerFatigueCount = !value, true));
                    break;

                case "Draw Chances":
                    ElementSorterPlayer.AddItem(new ElementSorterItem("Draw Chances", !Config.Instance.HideDrawChances,
                                                                      value => Config.Instance.HideDrawChances = !value, true));
                    break;

                case "Wins":
                    ElementSorterPlayer.AddItem(new ElementSorterItem("Wins", Config.Instance.ShowDeckWins,
                                                                      value => Config.Instance.ShowDeckWins = value, true));
                    break;
                }
            }
            Core.Overlay.UpdatePlayerLayout();
            Core.Windows.PlayerWindow.UpdatePlayerLayout();
            _initialized = true;
        }
Exemplo n.º 3
0
        private void SetPanel()
        {
            foreach (var panel in Config.Instance.DeckPanelOrderPlayer)
            {
                switch (panel)
                {
                case Enums.DeckPanel.Cards:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, !Config.Instance.HidePlayerCards,
                                                                      value => Config.Instance.HidePlayerCards = !value, true));
                    break;

                case Enums.DeckPanel.CardCounter:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, !Config.Instance.HidePlayerCardCount,
                                                                      value => Config.Instance.HidePlayerCardCount = !value, true));
                    break;

                case Enums.DeckPanel.DrawChances:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, !Config.Instance.HideDrawChances,
                                                                      value => Config.Instance.HideDrawChances = !value, true));
                    break;

                case Enums.DeckPanel.Fatigue:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, !Config.Instance.HidePlayerFatigueCount,
                                                                      value => Config.Instance.HidePlayerFatigueCount = !value, true));
                    break;

                case Enums.DeckPanel.DeckTitle:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, Config.Instance.ShowDeckTitle,
                                                                      value => Config.Instance.ShowDeckTitle = value, true));
                    break;

                case Enums.DeckPanel.Wins:
                    ElementSorterPlayer.AddItem(new ElementSorterItem(panel, Config.Instance.ShowDeckWins,
                                                                      value => Config.Instance.ShowDeckWins = value, true));
                    break;
                }
            }
        }
Exemplo n.º 4
0
 public void ReloadUI()
 {
     ElementSorterPlayer.Clear();
     SetPanel();
 }