Handle description data in editor
This commit is contained in:
parent
5e06aba595
commit
39c6df0719
1 changed files with 29 additions and 0 deletions
|
|
@ -200,6 +200,7 @@ struct Editor::Impl : EditorController::Receiver, IControlListener {
|
||||||
void updateKeyswitchNameLabel();
|
void updateKeyswitchNameLabel();
|
||||||
|
|
||||||
void updateKeyUsed(unsigned key, bool used);
|
void updateKeyUsed(unsigned key, bool used);
|
||||||
|
void updateKeyLabel(unsigned key, const char* label);
|
||||||
void updateKeyswitchUsed(unsigned key, bool used);
|
void updateKeyswitchUsed(unsigned key, bool used);
|
||||||
void updateCCUsed(unsigned cc, bool used);
|
void updateCCUsed(unsigned cc, bool used);
|
||||||
void updateCCValue(unsigned cc, float value);
|
void updateCCValue(unsigned cc, float value);
|
||||||
|
|
@ -461,6 +462,27 @@ void Editor::Impl::uiReceiveValue(EditId id, const EditValue& v)
|
||||||
if (SPiano* piano = piano_)
|
if (SPiano* piano = piano_)
|
||||||
piano->setKeyValue(key, value);
|
piano->setKeyValue(key, value);
|
||||||
}
|
}
|
||||||
|
else if (editIdIsKeyUsed(id)) {
|
||||||
|
updateKeyUsed(keyUsedForEditId(id), v.to_float() != 0);
|
||||||
|
}
|
||||||
|
else if (editIdIsKeyLabel(id)) {
|
||||||
|
updateKeyLabel(keyLabelForEditId(id), v.to_string().c_str());
|
||||||
|
}
|
||||||
|
else if (editIdIsKeyswitchUsed(id)) {
|
||||||
|
updateKeyswitchUsed(keyswitchUsedForEditId(id), v.to_float() != 0);
|
||||||
|
}
|
||||||
|
else if (editIdIsKeyswitchLabel(id)) {
|
||||||
|
updateSWLastLabel(keyswitchLabelForEditId(id), v.to_string().c_str());
|
||||||
|
}
|
||||||
|
else if (editIdIsCCUsed(id)) {
|
||||||
|
updateCCUsed(ccUsedForEditId(id), v.to_float() != 0);
|
||||||
|
}
|
||||||
|
else if (editIdIsCCDefault(id)) {
|
||||||
|
updateCCDefaultValue(ccDefaultForEditId(id), v.to_float());
|
||||||
|
}
|
||||||
|
else if (editIdIsCCLabel(id)) {
|
||||||
|
updateCCLabel(ccLabelForEditId(id), v.to_string().c_str());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1519,6 +1541,13 @@ void Editor::Impl::updateKeyUsed(unsigned key, bool used)
|
||||||
piano->setKeyUsed(key, used);
|
piano->setKeyUsed(key, used);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Editor::Impl::updateKeyLabel(unsigned key, const char* label)
|
||||||
|
{
|
||||||
|
// TODO nothing done with this info currently
|
||||||
|
(void)key;
|
||||||
|
(void)label;
|
||||||
|
}
|
||||||
|
|
||||||
void Editor::Impl::updateKeyswitchUsed(unsigned key, bool used)
|
void Editor::Impl::updateKeyswitchUsed(unsigned key, bool used)
|
||||||
{
|
{
|
||||||
if (SPiano* piano = piano_)
|
if (SPiano* piano = piano_)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue