From de0a4e652aba312ada5374799e220a7458ced8e4 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 21 Nov 2025 16:40:48 -0500 Subject: [PATCH] add button to access macro menu on mobile --- src/gui/insEdit.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index e2e5393b6..05b517aa7 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -2640,6 +2640,14 @@ void FurnaceGUI::drawMacroEdit(FurnaceGUIMacroDesc& i, int totalFit, float avail } \ popToggleColors(); \ +#define BUTTON_FOR_MACRO_MENU(buttonType) \ + if (mobileUI) { \ + if (buttonType(ICON_FA_PAGELINES "##IMacroMenu")) { \ + lastMacroDesc=i; \ + displayMacroMenu=true; \ + } \ + } + void FurnaceGUI::drawMacros(std::vector& macros, FurnaceGUIMacroEditState& state, DivInstrument* ins) { int index=0; int maxMacroLen=0; @@ -2726,6 +2734,7 @@ void FurnaceGUI::drawMacros(std::vector& macros, FurnaceGUI ImGui::SameLine(); BUTTON_TO_SET_RELEASE(ImGui::Button); } + BUTTON_FOR_MACRO_MENU(ImGui::Button); // do not change this! // anything other than a checkbox will look ugly! // if you really need more than two macro modes please tell me. @@ -2811,6 +2820,7 @@ void FurnaceGUI::drawMacros(std::vector& macros, FurnaceGUI ImGui::SameLine(); BUTTON_TO_SET_RELEASE(ImGui::Button); } + BUTTON_FOR_MACRO_MENU(ImGui::Button); if (i.modeName!=NULL) { bool modeVal=i.macro->mode; String modeName=fmt::sprintf("%s##IMacroMode",i.modeName); @@ -2963,6 +2973,7 @@ void FurnaceGUI::drawMacros(std::vector& macros, FurnaceGUI ImGui::SameLine(); BUTTON_TO_SET_RELEASE(ImGui::Button); } + BUTTON_FOR_MACRO_MENU(ImGui::Button); } if (m.modeName!=NULL) { bool modeVal=m.macro->mode;