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

Method SelectInstrument

Source/InstrumentEditorFDS.cpp:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void CInstrumentEditorFDS::SelectInstrument(std::shared_ptr<CInstrument> pInst)
61{
62 m_pInstrument = std::dynamic_pointer_cast<CInstrumentFDS>(pInst);
63 ASSERT(m_pInstrument);
64
65 if (m_pWaveEditor)
66 m_pWaveEditor->SetInstrument(m_pInstrument);
67
68 if (m_pModSequenceEditor)
69 m_pModSequenceEditor->SetInstrument(m_pInstrument);
70
71 static_cast<CSpinButtonCtrl*>(GetDlgItem(IDC_MOD_RATE_SPIN))->SetPos(m_pInstrument->GetModulationSpeed());
72 static_cast<CSpinButtonCtrl*>(GetDlgItem(IDC_MOD_DEPTH_SPIN))->SetPos(m_pInstrument->GetModulationDepth());
73 static_cast<CSpinButtonCtrl*>(GetDlgItem(IDC_MOD_DELAY_SPIN))->SetPos(m_pInstrument->GetModulationDelay());
74
75// CheckDlgButton(IDC_ENABLE_FM, m_pInstrument->GetModulationEnable() ? 1 : 0);
76
77 EnableModControls(m_pInstrument->GetModulationEnable());
78}
79
80
81BEGIN_MESSAGE_MAP(CInstrumentEditorFDS, CInstrumentEditPanel)

Callers

nothing calls this directly

Calls 5

GetModulationSpeedMethod · 0.80
GetModulationDepthMethod · 0.80
GetModulationDelayMethod · 0.80
GetModulationEnableMethod · 0.80
SetInstrumentMethod · 0.45

Tested by

no test coverage detected