System.Collections.Generic.List.Add(midiPanel)

Here are the examples of the csharp api System.Collections.Generic.List.Add(midiPanel) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : midiComponentInterface.cs
License : Apache License 2.0
Project Creator : googlearchive

void OpenList() {
    MIDImaster.instance.RefreshDevices(input);

    int count = input ? MIDImaster.instance.inputDevices.Count : MIDImaster.instance.outputDevices.Count;

    for (int i = 0; i < count; i++) {
      midiPanel m = (Instantiate(midiPanelPrefab, transform, false) as GameObject).GetComponent<midiPanel>();
      m.transform.localPosition = new Vector3(0, i * .03f + .045f, .015f);
      m.transform.localRotation = Quaternion.idenreplacedy;
      m.transform.localScale = new Vector3(0.15f, .02f, 1.25f);
      m.label.text = input ? MIDImaster.instance.inputDevices[i].name : MIDImaster.instance.outputDevices[i].name;

      m.buttonID = i;
      midiPanelList.Add(m);
    }

    if (count == 0) {
      statusText.gameObject.SetActive(true);
      statusText.text = "NO MIDI DEVICES FOUND";
      if (gameObject.activeSelf) {
        if (_textKillRoutine != null) StopCoroutine(_textKillRoutine);
        _textKillRoutine = StartCoroutine(TextKillRoutine());
      }
      listopen = false;
      CloseList();
    }
  }