コード例 #1
0
void MantaAudioUnitController::updateButtonColor(int index)
{
    if (buttonMap.count(index) == 0)
    {
        setButtonLedState(index, Manta::Off);
        setButtonColor(index, ofColor::white);
    }
    else if (buttonMap[index]->toggle)
    {
        ofColor synthColor = synths[buttonMap[index]->synthName]->getColor();
        if (buttonMap[index]->parameter == buttonMap[index]->min)
        {
            setButtonColor(index, ofColor(synthColor, 100));
            setButtonLedState(index, Manta::Off);
        }
        else
        {
            setButtonColor(index, synthColor);
            setButtonLedState(index, Manta::Red);
        }
    }
    else
    {
        ofColor synthColor = synths[buttonMap[index]->synthName]->getColor();
        setButtonLedState(index, Manta::Red);
        setButtonColor(index, synthColor);
    }
}
コード例 #2
0
ファイル: MantaController.cpp プロジェクト: decebel/OF-tools
void MantaController::markAllButtons(bool mark)
{
    setLedManual(true);
    for (int i=0; i<4; i++) {
        setButtonLedState(i, mark ? Manta::Red : Manta::Off);
    }
    setLedManual(false);
}
コード例 #3
0
ファイル: MantaController.cpp プロジェクト: decebel/OF-tools
void MantaController::markButton(int index, bool mark)
{
    setLedManual(true);
    setButtonLedState(index, mark ? Manta::Red : Manta::Off);
    setLedManual(false);
}
コード例 #4
0
void MantaAudioUnitController::setPadFreezingEnabled(bool toFreezePads)
{
    this->toFreezePads = toFreezePads;
    setButtonLedState(1, toFreezePads ? Manta::Red : Manta::Off);
    setButtonColor(1, toFreezePads ? ofColor::blue : ofColor::white);
}