| 68 | } |
| 69 | |
| 70 | void Chorder::DrawModule() |
| 71 | { |
| 72 | if (Minimized() || IsVisible() == false) |
| 73 | return; |
| 74 | |
| 75 | ofPushStyle(); |
| 76 | ofFill(); |
| 77 | for (int i = 0; i < mChordGrid->GetCols(); ++i) |
| 78 | { |
| 79 | bool addColor = false; |
| 80 | if (i == 0) |
| 81 | { |
| 82 | ofSetColor(0, 255, 0, 80); |
| 83 | addColor = true; |
| 84 | } |
| 85 | else if ((mDiatonic && i == 4 && TheScale->NumTonesInScale() == 7) || (!mDiatonic && i == 7 && TheScale->GetPitchesPerOctave() == 12)) |
| 86 | { |
| 87 | ofSetColor(200, 150, 0, 80); |
| 88 | addColor = true; |
| 89 | } |
| 90 | |
| 91 | if (addColor) |
| 92 | { |
| 93 | ofRectangle rect = mChordGrid->GetRect(true); |
| 94 | rect.width /= mChordGrid->GetCols(); |
| 95 | rect.x += i * rect.width; |
| 96 | ofRect(rect); |
| 97 | } |
| 98 | } |
| 99 | ofPopStyle(); |
| 100 | |
| 101 | mChordGrid->Draw(); |
| 102 | mDiatonicCheckbox->Draw(); |
| 103 | mChordDropdown->Draw(); |
| 104 | mInversionDropdown->Draw(); |
| 105 | } |
| 106 | |
| 107 | void Chorder::GridUpdated(UIGrid* grid, int col, int row, float value, float oldValue) |
| 108 | { |
nothing calls this directly
no test coverage detected