Skip to content

Commit a125764

Browse files
committed
update hvcc; add wasm modal
1 parent e49e3db commit a125764

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55

66
env:
7-
HVCC_COMMIT_HASH: 023bd292a3a3391ab60d80e28ded33f1f05669ea
7+
HVCC_COMMIT_HASH: e04604782a027980f19b111439f434dc13098438
88
CACHE_VERSION: 1
99
DEBIAN_FRONTEND: noninteractive
1010
GIT_LFS_SKIP_SMUDGE: 1

override/HeavyDPF_WSTD_DLAY_UI.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
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

0 commit comments

Comments
 (0)