Esempio n. 1
0
 public Note(int id)
 {
     _id          = id;
     _name        = NoteStringHelper.GetNoteName(id);
     _noteIndex   = NoteStringHelper.GetNoteIndex(id);
     _octaveIndex = NoteStringHelper.GetOctaveIndex(id);
 }
Esempio n. 2
0
 public Note(string name)
 {
     _id          = NoteStringHelper.GetNoteId(name);
     _name        = name;
     _noteIndex   = NoteStringHelper.GetNoteIndex(_id);
     _octaveIndex = NoteStringHelper.GetOctaveIndex(_id);
 }
        public override void SetData(NoteRowDef dataProvider, int index)
        {
            base.SetData(dataProvider, index);

            RemoveListeners();

            View.NameInput.text        = dataProvider.Label;
            View.NoteDropdown.value    = NoteStringHelper.GetNoteIndex(dataProvider.Note.Name);
            View.OctaveDropdown.value  = NoteStringHelper.GetOctaveIndex(dataProvider.Note.Name);
            View.AlwaysShowToggle.isOn = dataProvider.AlwaysShow;

            AddUiListeners();
        }