Exemplo n.º 1
0
 public Note(int noteIndex, int octaveIndex)
 {
     _id          = NoteStringHelper.GetNoteId(noteIndex, octaveIndex);
     _name        = NoteStringHelper.GetNoteName(noteIndex, octaveIndex);
     _noteIndex   = noteIndex;
     _octaveIndex = octaveIndex;
 }
Exemplo n.º 2
0
 public Note(int id)
 {
     _id          = id;
     _name        = NoteStringHelper.GetNoteName(id);
     _noteIndex   = NoteStringHelper.GetNoteIndex(id);
     _octaveIndex = NoteStringHelper.GetOctaveIndex(id);
 }
Exemplo n.º 3
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();
        }