Пример #1
0
 private void AddNewBuffBarClick(object sender, MouseButtonEventArgs e)
 {
     if (UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.ActiveBars > 4)
     {
         AddNewBuffBar.Opacity = 0.5;
         return;
     }
     SubBuffBar.Opacity = 1;
     UserSettings.AddNewAbnormalityBar(1);
     UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.ActiveBars += 1;
     Custom_Controls.BuffBarSettingControl BuffBar = new Custom_Controls.BuffBarSettingControl()
     {
         PresetName = UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.BarPresets.LastOrDefault().Name,
         Enabled    = UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.BarPresets.LastOrDefault().Enabled,
         TrayIndex  = UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.BarPresets.Length - 1
     };
     BuffTrays.Children.Add(BuffBar);
     NumberOfBuffBars.Text = UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.ActiveBars.ToString();
     if (UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.ActiveBars >= 5)
     {
         AddNewBuffBar.Opacity = 0.5;
         SubBuffBar.Opacity    = 1;
         return;
     }
 }
Пример #2
0
 private void CreateAbnormBarSettingsIfNeeded()
 {
     if (UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.ActiveBars > UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.BarPresets.Length)
     {
         UserSettings.AddNewAbnormalityBar(UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.ActiveBars - UserSettings.PlayerConfig.Overlay.AbnormalitiesWidget.BarPresets.Length);
     }
 }