本文整理汇总了C++中ModifierKeys::isAltDown方法的典型用法代码示例。如果您正苦于以下问题:C++ ModifierKeys::isAltDown方法的具体用法?C++ ModifierKeys::isAltDown怎么用?C++ ModifierKeys::isAltDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModifierKeys
的用法示例。
在下文中一共展示了ModifierKeys::isAltDown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buttonClicked
//.........这里部分代码省略.........
recentlyUpdated = false;
//update the GUI (only need to do this a single time)
if (padIndex == 0)
{
setKeyDisplay (i, false);
selectedKeys.removeFirstMatchingValue(i);
//Don't need to sort keys here do I?
//Removing an element will resize the array,
//which will cause the top row to be set to note 'off'
}
for (int row = 0; row < 12; row++)
{
int note = selectedKeys[row];
if (row > selectedKeys.size()-1)
note = -500; //'off' note
PAD_SETTINGS->setSequencerMidiNote(note, row);
}
}
noteNumber = selectedKeys[0];
}
}
}
//=========================================================================
//=========================================================================
//alt-click to transpose mutiple notes for midi pads
else if (modifier.isAltDown() == true)
{
if (AppSettings::Instance()->padSettings[selectedPads[0]]->getMode() == 1) //Midi Mode
{
//clear all keys
for (int i = 0; i < 120; i++)
setKeyDisplay(i, false);
selectedKeys.clear();
//At the moment the currentl alg. belows won't allow you to transpose a scale
//if ANY note will be transposed to above 119. Also, when transposing the note
//you select will be the lowest note. However in the old software it was possible
//to transpose notational arrangements so that the bottom set of notes would all
//equal 0 or the top sets would all equal 119, meaning you could have more choice
//over where the arrangment starts and ends. Do we want that here? If so, the below
//code will need to be changed to how it was before (most of it has just been
//commented out.
//Get the 'root note'.
//Should the root note be the note of the first select pad (selectedPads[0]).
//Or should it be the lowest note?
//Below is the code to find the lowest note.
Array <int> selectedPadsNotes;
for (int padIndex = 0; padIndex < selectedPads.size(); padIndex++)
selectedPadsNotes.insert(padIndex,
AppSettings::Instance()->padSettings[selectedPads[padIndex]]->getMidiNote());
DefaultElementComparator<int> sorter;
selectedPadsNotes.sort (sorter);
int rootNote = selectedPadsNotes[0];
//get difference between root note and clicked note
int transposeValue = rootNote - i;