| 93 | } |
| 94 | |
| 95 | void PulseSequence::DrawModule() |
| 96 | { |
| 97 | if (Minimized() || IsVisible() == false) |
| 98 | return; |
| 99 | |
| 100 | ofSetColor(255, 255, 255, gModuleDrawAlpha); |
| 101 | |
| 102 | mIntervalSelector->SetShowing(!mHasExternalPulseSource); |
| 103 | mAdvanceBackwardButton->SetShowing(mHasExternalPulseSource); |
| 104 | mAdvanceForwardButton->SetShowing(mHasExternalPulseSource); |
| 105 | mPulseOnAdvanceCheckbox->SetShowing(mHasExternalPulseSource); |
| 106 | |
| 107 | mIntervalSelector->Draw(); |
| 108 | mLengthSlider->Draw(); |
| 109 | mVelocityGrid->Draw(); |
| 110 | mAdvanceBackwardButton->Draw(); |
| 111 | mAdvanceForwardButton->Draw(); |
| 112 | mPulseOnAdvanceCheckbox->Draw(); |
| 113 | mShiftLeftButton->Draw(); |
| 114 | mShiftRightButton->Draw(); |
| 115 | |
| 116 | for (int i = 0; i < kIndividualStepCables; ++i) |
| 117 | { |
| 118 | if (i < mLength) |
| 119 | { |
| 120 | ofVec2f pos = mVelocityGrid->GetCellPosition(i, 0) + mVelocityGrid->GetPosition(true); |
| 121 | pos.x += mVelocityGrid->GetWidth() / float(mLength) * .5f; |
| 122 | pos.y += mVelocityGrid->GetHeight() + 8; |
| 123 | mStepCables[i]->SetManualPosition(pos.x, pos.y); |
| 124 | mStepCables[i]->SetEnabled(true); |
| 125 | } |
| 126 | else |
| 127 | { |
| 128 | mStepCables[i]->SetEnabled(false); |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | void PulseSequence::CheckboxUpdated(Checkbox* checkbox, double time) |
| 134 | { |
nothing calls this directly
no test coverage detected