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

Method SelectSequence

Source/SequenceEditor.cpp:219–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217//const int SEQ_SUNSOFT_NOISE = sequence_t::DutyCycle + 1;
218
219void CSequenceEditor::SelectSequence(std::shared_ptr<CSequence> pSequence, int InstrumentType) // // //
220{
221 // Select a sequence to edit
222 m_pSequence = std::move(pSequence);
223 m_iInstrumentType = InstrumentType;
224
225 DestroyGraphEditor();
226
227 CRect GraphRect;
228 GetClientRect(GraphRect);
229 GraphRect.bottom -= DPI::SY(BOTTOM_MARGIN); // // //
230
231 CGraphEditorFactory factory; // // //
232 m_pGraphEditor = factory.Make(this, GraphRect, m_pSequence, InstrumentType, m_iMaxVol, m_iMaxDuty);
233
234 m_pSetting->SelectSequence(m_pSequence, InstrumentType);
235
236 m_pGraphEditor->UpdateWindow();
237 m_pGraphEditor->ShowWindow(SW_SHOW);
238
239 m_pSizeEditor->SetValue(m_pSequence->GetItemCount());
240
241 Invalidate();
242 RedrawWindow();
243
244 // Update sequence string
245 SequenceChangedMessage(false);
246}
247
248BOOL CSequenceEditor::DestroyWindow()
249{

Callers 1

LoadSequenceMethod · 0.45

Calls 3

MakeMethod · 0.45
SetValueMethod · 0.45
GetItemCountMethod · 0.45

Tested by

no test coverage detected