File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 44 push :
55
66env :
7- HVCC_COMMIT_HASH : 023bd292a3a3391ab60d80e28ded33f1f05669ea
7+ HVCC_COMMIT_HASH : e04604782a027980f19b111439f434dc13098438
88 CACHE_VERSION : 1
99 DEBIAN_FRONTEND : noninteractive
1010 GIT_LFS_SKIP_SMUDGE : 1
Original file line number Diff line number Diff line change 33 */
44
55#include " DistrhoUI.hpp"
6+ #ifdef DISTRHO_OS_WASM
7+ #include " DistrhoStandaloneUtils.hpp"
8+ #endif
69#include " ResizeHandle.hpp"
710#include " veramobd.hpp"
811#include " wstdcolors.hpp"
@@ -102,6 +105,9 @@ class ImGuiPluginUI : public UI
102105 const float width = getWidth ();
103106 const float height = getHeight ();
104107 const float margin = 0 .0f ;
108+ #ifdef DISTRHO_OS_WASM
109+ static bool inputActive = false ;
110+ #endif
105111
106112 ImGui::SetNextWindowPos (ImVec2 (margin, margin));
107113 ImGui::SetNextWindowSize (ImVec2 (width - 2 * margin, height - 2 * margin));
@@ -168,6 +174,25 @@ class ImGuiPluginUI : public UI
168174 {
169175 ImGui::Dummy (ImVec2 (0 .0f , 8 .0f * scaleFactor));
170176 ImGui::PushFont (defaultFont);
177+
178+ #ifdef DISTRHO_OS_WASM
179+ if (!inputActive)
180+ {
181+ ImGui::OpenPopup (" Activate" );
182+ }
183+
184+ if (ImGui::BeginPopupModal (" Activate" , nullptr , ImGuiWindowFlags_NoResize + ImGuiWindowFlags_NoMove))
185+ {
186+ if (ImGui::Button (" OK" , ImVec2 (80 , 0 )))
187+ {
188+ requestAudioInput ();
189+ inputActive = true ;
190+ ImGui::CloseCurrentPopup ();
191+ }
192+ ImGui::EndPopup ();
193+ }
194+ #endif
195+
171196 auto ImGuiKnob_Flags = ImGuiKnobFlags_DoubleClickReset + ImGuiKnobFlags_ValueTooltip + ImGuiKnobFlags_NoInput + ImGuiKnobFlags_ValueTooltipHideOnClick;
172197 auto ImGuiKnob_FlagsLog = ImGuiKnob_Flags + ImGuiKnobFlags_Logarithmic;
173198
You can’t perform that action at this time.
0 commit comments