Ejemplo n.º 1
0
 public void Initialize()
 {
     if (NiceMissManager.modActive)
     {
         objectmanager.noteDidStartJumpEvent += Objectmanager_noteDidStartJumpEvent;
         objectmanager.noteWasCutEvent       += Objectmanager_noteWasCutEvent;
         objectmanager.noteWasMissedEvent    += Objectmanager_noteWasMissedEvent;
     }
     missColor = PluginConfig.Instance.Mode == PluginConfig.ModeEnum.Hitscore ? PluginConfig.Instance.HitscoreColors.Find(x => x.type == HitscoreColor.TypeEnum.Miss) : null;
 }
Ejemplo n.º 2
0
 private void MoveEntryDown()
 {
     if (selectedIndex < PluginConfig.Instance.HitscoreColors.Count - 1)
     {
         int           tmpIndex = selectedIndex + 1;
         HitscoreColor tmp      = PluginConfig.Instance.HitscoreColors[tmpIndex];
         PluginConfig.Instance.HitscoreColors[tmpIndex]      = PluginConfig.Instance.HitscoreColors[selectedIndex];
         PluginConfig.Instance.HitscoreColors[selectedIndex] = tmp;
         UpdateTable();
         customListTableData.tableView.SelectCellWithIdx(tmpIndex);
         HitscoreSelect(customListTableData.tableView, tmpIndex);
     }
 }
Ejemplo n.º 3
0
        public void ShowModal(Transform parent)
        {
            hitscoreColor = new HitscoreColor();
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(type)));
            UpdateSliderRange();
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(notUseMiss)));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(min)));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(max)));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(color)));

            Parse(parent);
            parserParams.EmitEvent("closeModal");
            parserParams.EmitEvent("openModal");
        }
Ejemplo n.º 4
0
        private void OnEntryAdded(HitscoreColor entryToAdd)
        {
            if (entryToAdd.type == HitscoreColor.TypeEnum.Miss)
            {
                entryToAdd.max = 0;
            }

            int duplicateEntryIndex = PluginConfig.Instance.HitscoreColors.FindIndex(x => x.max == entryToAdd.max && x.type == entryToAdd.type);

            if (duplicateEntryIndex != -1)
            {
                PluginConfig.Instance.HitscoreColors[duplicateEntryIndex] = entryToAdd;
            }
            else
            {
                PluginConfig.Instance.HitscoreColors.Add(entryToAdd);
            }

            PluginConfig.Instance.Changed();
        }