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

Method MoveToChannel

Source/PatternEditor.cpp:2168–2189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2166}
2167
2168void CPatternEditor::MoveToChannel(int Channel)
2169{
2170 const int ChannelCount = GetChannelCount();
2171
2172 if (Channel == GetChannel())
2173 return;
2174
2175 if (Channel < 0) {
2176 if (FTEnv.GetSettings()->General.bWrapCursor)
2177 Channel = ChannelCount - 1;
2178 else
2179 Channel = 0;
2180 }
2181 else if (Channel > ChannelCount - 1) {
2182 if (FTEnv.GetSettings()->General.bWrapCursor)
2183 Channel = 0;
2184 else
2185 Channel = ChannelCount - 1;
2186 }
2187 m_cpCursorPos.Xpos.Track = Channel;
2188 m_cpCursorPos.Xpos.Column = cursor_column_t::NOTE;
2189}
2190
2191void CPatternEditor::MoveToColumn(cursor_column_t Column)
2192{

Callers 1

SelectChannelMethod · 0.80

Calls 1

GetSettingsMethod · 0.45

Tested by

no test coverage detected