mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: add mobile mixer
This commit is contained in:
parent
9e9b0e8e75
commit
4b85ec433b
4 changed files with 21 additions and 1 deletions
|
@ -449,6 +449,10 @@ void FurnaceGUI::drawMobileControls() {
|
||||||
mobScene=GUI_SCENE_CHIPS;
|
mobScene=GUI_SCENE_CHIPS;
|
||||||
}
|
}
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
if (ImGui::Button("Mixer",buttonSize)) {
|
||||||
|
mobScene=GUI_SCENE_MIXER;
|
||||||
|
}
|
||||||
|
ImGui::TableNextColumn();
|
||||||
if (ImGui::Button("Other",buttonSize)) {
|
if (ImGui::Button("Other",buttonSize)) {
|
||||||
mobScene=GUI_SCENE_OTHER;
|
mobScene=GUI_SCENE_OTHER;
|
||||||
}
|
}
|
||||||
|
@ -521,6 +525,9 @@ void FurnaceGUI::drawMobileControls() {
|
||||||
case GUI_SCENE_CHIPS:
|
case GUI_SCENE_CHIPS:
|
||||||
ImGui::Text("Chips here...");
|
ImGui::Text("Chips here...");
|
||||||
break;
|
break;
|
||||||
|
case GUI_SCENE_MIXER:
|
||||||
|
ImGui::Text("What the hell...");
|
||||||
|
break;
|
||||||
case GUI_SCENE_OTHER: {
|
case GUI_SCENE_OTHER: {
|
||||||
if (ImGui::Button("Osc")) {
|
if (ImGui::Button("Osc")) {
|
||||||
oscOpen=!oscOpen;
|
oscOpen=!oscOpen;
|
||||||
|
|
|
@ -3863,6 +3863,11 @@ bool FurnaceGUI::loop() {
|
||||||
curWindow=GUI_WINDOW_SYS_MANAGER;
|
curWindow=GUI_WINDOW_SYS_MANAGER;
|
||||||
drawSysManager();
|
drawSysManager();
|
||||||
break;
|
break;
|
||||||
|
case GUI_SCENE_MIXER:
|
||||||
|
mixerOpen=true;
|
||||||
|
curWindow=GUI_WINDOW_MIXER;
|
||||||
|
drawMixer();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
patternOpen=true;
|
patternOpen=true;
|
||||||
curWindow=GUI_WINDOW_PATTERN;
|
curWindow=GUI_WINDOW_PATTERN;
|
||||||
|
|
|
@ -325,6 +325,7 @@ enum FurnaceGUIMobileScenes {
|
||||||
GUI_SCENE_SONG,
|
GUI_SCENE_SONG,
|
||||||
GUI_SCENE_CHANNELS,
|
GUI_SCENE_CHANNELS,
|
||||||
GUI_SCENE_CHIPS,
|
GUI_SCENE_CHIPS,
|
||||||
|
GUI_SCENE_MIXER,
|
||||||
GUI_SCENE_OTHER,
|
GUI_SCENE_OTHER,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,14 @@ void FurnaceGUI::drawMixer() {
|
||||||
nextWindow=GUI_WINDOW_NOTHING;
|
nextWindow=GUI_WINDOW_NOTHING;
|
||||||
}
|
}
|
||||||
if (!mixerOpen) return;
|
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))) {
|
if (ImGui::Begin("Mixer",&mixerOpen,globalWinFlags|(settings.allowEditDocking?0:ImGuiWindowFlags_NoDocking))) {
|
||||||
char id[32];
|
char id[32];
|
||||||
if (ImGui::SliderFloat("Master Volume",&e->song.masterVol,0,3,"%.2fx")) {
|
if (ImGui::SliderFloat("Master Volume",&e->song.masterVol,0,3,"%.2fx")) {
|
||||||
|
|
Loading…
Reference in a new issue