GUI: add mobile mixer

This commit is contained in:
tildearrow 2023-01-07 16:26:36 -05:00
parent 9e9b0e8e75
commit 4b85ec433b
4 changed files with 21 additions and 1 deletions

View File

@ -449,6 +449,10 @@ void FurnaceGUI::drawMobileControls() {
mobScene=GUI_SCENE_CHIPS;
}
ImGui::TableNextColumn();
if (ImGui::Button("Mixer",buttonSize)) {
mobScene=GUI_SCENE_MIXER;
}
ImGui::TableNextColumn();
if (ImGui::Button("Other",buttonSize)) {
mobScene=GUI_SCENE_OTHER;
}
@ -521,6 +525,9 @@ void FurnaceGUI::drawMobileControls() {
case GUI_SCENE_CHIPS:
ImGui::Text("Chips here...");
break;
case GUI_SCENE_MIXER:
ImGui::Text("What the hell...");
break;
case GUI_SCENE_OTHER: {
if (ImGui::Button("Osc")) {
oscOpen=!oscOpen;

View File

@ -3863,6 +3863,11 @@ bool FurnaceGUI::loop() {
curWindow=GUI_WINDOW_SYS_MANAGER;
drawSysManager();
break;
case GUI_SCENE_MIXER:
mixerOpen=true;
curWindow=GUI_WINDOW_MIXER;
drawMixer();
break;
default:
patternOpen=true;
curWindow=GUI_WINDOW_PATTERN;

View File

@ -325,6 +325,7 @@ enum FurnaceGUIMobileScenes {
GUI_SCENE_SONG,
GUI_SCENE_CHANNELS,
GUI_SCENE_CHIPS,
GUI_SCENE_MIXER,
GUI_SCENE_OTHER,
};

View File

@ -27,7 +27,14 @@ void FurnaceGUI::drawMixer() {
nextWindow=GUI_WINDOW_NOTHING;
}
if (!mixerOpen) return;
ImGui::SetNextWindowSizeConstraints(ImVec2(400.0f*dpiScale,200.0f*dpiScale),ImVec2(canvasW,canvasH));
if (mobileUI) {
patWindowPos=(portrait?ImVec2(0.0f,(mobileMenuPos*-0.65*canvasH)):ImVec2((0.16*canvasH)+0.5*canvasW*mobileMenuPos,0.0f));
patWindowSize=(portrait?ImVec2(canvasW,canvasH-(0.16*canvasW)):ImVec2(canvasW-(0.16*canvasH),canvasH));
ImGui::SetNextWindowPos(patWindowPos);
ImGui::SetNextWindowSize(patWindowSize);
} else {
ImGui::SetNextWindowSizeConstraints(ImVec2(400.0f*dpiScale,200.0f*dpiScale),ImVec2(canvasW,canvasH));
}
if (ImGui::Begin("Mixer",&mixerOpen,globalWinFlags|(settings.allowEditDocking?0:ImGuiWindowFlags_NoDocking))) {
char id[32];
if (ImGui::SliderFloat("Master Volume",&e->song.masterVol,0,3,"%.2fx")) {