improve inital sys steeings

This commit is contained in:
Eknous-P 2023-08-26 13:53:01 +04:00
parent a832adeac5
commit 89921b1ff3

View file

@ -576,7 +576,7 @@ void FurnaceGUI::drawSettings() {
float vol=fabs(sysVol); float vol=fabs(sysVol);
ImGui::PushID(i); ImGui::PushID(i);
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::CalcTextSize("Invert").x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::CalcTextSize("Invert").x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x*2.0);
if (ImGui::BeginCombo("##System",getSystemName(sysID))) { if (ImGui::BeginCombo("##System",getSystemName(sysID))) {
for (int j=0; availableSystems[j]; j++) { for (int j=0; availableSystems[j]; j++) {
if (ImGui::Selectable(getSystemName((DivSystem)availableSystems[j]),sysID==availableSystems[j])) { if (ImGui::Selectable(getSystemName((DivSystem)availableSystems[j]),sysID==availableSystems[j])) {
@ -595,11 +595,13 @@ void FurnaceGUI::drawSettings() {
} }
ImGui::SameLine(); ImGui::SameLine();
//ImGui::BeginDisabled(settings.initialSys.size()<=4); //ImGui::BeginDisabled(settings.initialSys.size()<=4);
pushDestColor();
if (ImGui::Button(ICON_FA_MINUS "##InitSysRemove")) { if (ImGui::Button(ICON_FA_MINUS "##InitSysRemove")) {
doRemove=i; doRemove=i;
} }
popDestColor();
//ImGui::EndDisabled(); //ImGui::EndDisabled();
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x*2.0);
if (CWSliderFloat("Volume",&vol,0.0f,3.0f)) { if (CWSliderFloat("Volume",&vol,0.0f,3.0f)) {
if (doInvert) { if (doInvert) {
if (vol<0.0001) vol=0.0001; if (vol<0.0001) vol=0.0001;
@ -609,13 +611,13 @@ void FurnaceGUI::drawSettings() {
sysVol=doInvert?-vol:vol; sysVol=doInvert?-vol:vol;
settings.initialSys.set(fmt::sprintf("vol%d",i),(float)sysVol); settings.initialSys.set(fmt::sprintf("vol%d",i),(float)sysVol);
} rightClickable } rightClickable
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x*2.0);
if (CWSliderFloat("Panning",&sysPan,-1.0f,1.0f)) { if (CWSliderFloat("Panning",&sysPan,-1.0f,1.0f)) {
if (sysPan<-1.0f) sysPan=-1.0f; if (sysPan<-1.0f) sysPan=-1.0f;
if (sysPan>1.0f) sysPan=1.0f; if (sysPan>1.0f) sysPan=1.0f;
settings.initialSys.set(fmt::sprintf("pan%d",i),(float)sysPan); settings.initialSys.set(fmt::sprintf("pan%d",i),(float)sysPan);
} rightClickable } rightClickable
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-ImGui::GetFrameHeightWithSpacing()*2.0-ImGui::GetStyle().ItemSpacing.x*2.0);
if (CWSliderFloat("Front/Rear",&sysPanFR,-1.0f,1.0f)) { if (CWSliderFloat("Front/Rear",&sysPanFR,-1.0f,1.0f)) {
if (sysPanFR<-1.0f) sysPanFR=-1.0f; if (sysPanFR<-1.0f) sysPanFR=-1.0f;
if (sysPanFR>1.0f) sysPanFR=1.0f; if (sysPanFR>1.0f) sysPanFR=1.0f;