mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
GUI: add OPZ waveforms
This commit is contained in:
parent
ad19a69f27
commit
42a3391574
1 changed files with 7 additions and 3 deletions
|
@ -88,6 +88,10 @@ const char* oplWaveforms[8]={
|
||||||
"Sine", "Half Sine", "Absolute Sine", "Quarter Sine", "Squished Sine", "Squished AbsSine", "Square", "Derived Square"
|
"Sine", "Half Sine", "Absolute Sine", "Quarter Sine", "Squished Sine", "Squished AbsSine", "Square", "Derived Square"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const char* opzWaveforms[8]={
|
||||||
|
"Sine", "Triangle", "Cut Sine", "Cut Triangle", "Squished Sine", "Squished Triangle" "Squished AbsSine", "Squished AbsTriangle"
|
||||||
|
};
|
||||||
|
|
||||||
enum FMParams {
|
enum FMParams {
|
||||||
FM_ALG=0,
|
FM_ALG=0,
|
||||||
FM_FB=1,
|
FM_FB=1,
|
||||||
|
@ -1125,12 +1129,12 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
ImGui::Text("%s",FM_NAME(FM_SSG));
|
ImGui::Text("%s",FM_NAME(FM_SSG));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ins->type==DIV_INS_OPL) {
|
if (ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPZ) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
P(ImGui::SliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,oplWaveforms[op.ws&7])); rightClickable
|
P(ImGui::SliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:oplWaveforms[op.ws&7])); rightClickable
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ins->type==DIV_INS_OPL && ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("OPL2/3 only (last 4 waveforms are OPL3 only)");
|
ImGui::SetTooltip("OPL2/3 only (last 4 waveforms are OPL3 only)");
|
||||||
}
|
}
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
Loading…
Reference in a new issue