MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / DrawModule

Method DrawModule

Source/PlaySequencer.cpp:112–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void PlaySequencer::DrawModule()
113{
114 if (Minimized() || IsVisible() == false)
115 return;
116
117 mGridControlTarget->Draw();
118 mIntervalSelector->Draw();
119 mWriteCheckbox->Draw();
120 mNoteRepeatCheckbox->Draw();
121 mLinkColumnsCheckbox->Draw();
122 mNumMeasuresSelector->Draw();
123 for (size_t i = 0; i < mLanes.size(); ++i)
124 mLanes[i].mMuteOrEraseCheckbox->Draw();
125 for (size_t i = 0; i < mSavedPatterns.size(); ++i)
126 {
127 mSavedPatterns[i].mStoreButton->Draw();
128 mSavedPatterns[i].mLoadButton->Draw();
129 if (mSavedPatterns[i].mHasSequence)
130 {
131 ofPushStyle();
132 ofFill();
133 ofSetColor(0, 255, 0, 80);
134 ofRectangle rect = mSavedPatterns[i].mLoadButton->GetRect(K(local));
135 ofRect(rect);
136 ofPopStyle();
137 }
138 }
139
140 mGrid->Draw();
141
142 ofPushStyle();
143 ofSetColor(255, 0, 0, 50);
144 ofFill();
145 for (int i = 0; i < (int)mLanes.size(); ++i)
146 {
147 if (mLanes[i].mMuteOrErase)
148 {
149 ofRectangle gridRect = mGrid->GetRect(true);
150 ofVec2f cellPos = mGrid->GetCellPosition(0, i) + mGrid->GetPosition(true);
151 ofRect(cellPos.x, cellPos.y + 1, gridRect.width, gridRect.height / mGrid->GetRows());
152 }
153 }
154 ofPopStyle();
155}
156
157void PlaySequencer::OnClicked(float x, float y, bool right)
158{

Callers

nothing calls this directly

Calls 11

ofPushStyleFunction · 0.85
ofFillFunction · 0.85
ofSetColorFunction · 0.85
ofRectFunction · 0.85
ofPopStyleFunction · 0.85
sizeMethod · 0.80
DrawMethod · 0.45
GetRectMethod · 0.45
GetCellPositionMethod · 0.45
GetPositionMethod · 0.45
GetRowsMethod · 0.45

Tested by

no test coverage detected