MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OnLButtonUp

Method OnLButtonUp

Source/SampleEditorView.cpp:235–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void CSampleEditorView::OnLButtonUp(UINT nFlags, CPoint point)
236{
237 // Sets the start cursor
238
239 if (!m_iSize)
240 return;
241
242 if (!m_bClicked)
243 return;
244
245 m_bClicked = false;
246
247 double Sample = double(point.x + int(m_iViewStart / m_dSampleStep)) * m_dSampleStep;
248 int Offset = int(Sample / (8.0 * 64.0));
249
250 if (m_iSelEnd == m_iSelStart) {
251 m_iStartCursor = Offset;
252 m_iSelStart = m_iSelEnd = -1;
253 DrawStartCursor();
254 }
255 else {
256 if (m_iSelEnd < m_iSelStart) {
257 int Temp = m_iSelEnd;
258 m_iSelEnd = m_iSelStart;
259 m_iSelStart = Temp;
260 }
261 }
262
263 static_cast<CSampleEditorDlg*>(GetParent())->SelectionChanged();
264
265 CStatic::OnLButtonUp(nFlags, point);
266}
267
268void CSampleEditorView::DrawPlayCursor(int Pos)
269{

Callers

nothing calls this directly

Calls 1

SelectionChangedMethod · 0.80

Tested by

no test coverage detected