More wasm tweaks, add join discussion button
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
fc59537baa
commit
6de963d728
3 changed files with 21 additions and 6 deletions
2
carla
2
carla
|
|
@ -1 +1 @@
|
||||||
Subproject commit 93d3fff123f7630be1a28912c029b9775ffd0feb
|
Subproject commit c2cc82525302213d6bd64e33b3d6d2c8c413f4f3
|
||||||
2
dpf
2
dpf
|
|
@ -1 +1 @@
|
||||||
Subproject commit ee94ba0caeabe25e2ecff1039d321e8edb5acedd
|
Subproject commit 34bf2a4dfca724fc544f8ab0a15727ddf558d7d8
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
#include <ui/Label.hpp>
|
#include <ui/Label.hpp>
|
||||||
#include <ui/MenuOverlay.hpp>
|
#include <ui/MenuOverlay.hpp>
|
||||||
#include <ui/SequentialLayout.hpp>
|
#include <ui/SequentialLayout.hpp>
|
||||||
|
#include "CardinalCommon.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
|
|
@ -99,7 +100,7 @@ void handleHostParameterDrag(const CardinalPluginContext* pcontext, uint index,
|
||||||
struct WasmWelcomeDialog : rack::widget::OpaqueWidget
|
struct WasmWelcomeDialog : rack::widget::OpaqueWidget
|
||||||
{
|
{
|
||||||
static const constexpr float margin = 10;
|
static const constexpr float margin = 10;
|
||||||
static const constexpr float buttonWidth = 100;
|
static const constexpr float buttonWidth = 110;
|
||||||
|
|
||||||
WasmWelcomeDialog()
|
WasmWelcomeDialog()
|
||||||
{
|
{
|
||||||
|
|
@ -108,7 +109,7 @@ struct WasmWelcomeDialog : rack::widget::OpaqueWidget
|
||||||
using rack::ui::MenuOverlay;
|
using rack::ui::MenuOverlay;
|
||||||
using rack::ui::SequentialLayout;
|
using rack::ui::SequentialLayout;
|
||||||
|
|
||||||
box.size = rack::math::Vec(550, 280);
|
box.size = rack::math::Vec(550, 310);
|
||||||
|
|
||||||
SequentialLayout* const layout = new SequentialLayout;
|
SequentialLayout* const layout = new SequentialLayout;
|
||||||
layout->box.pos = rack::math::Vec(0, 0);
|
layout->box.pos = rack::math::Vec(0, 0);
|
||||||
|
|
@ -135,6 +136,7 @@ struct WasmWelcomeDialog : rack::widget::OpaqueWidget
|
||||||
label->fontSize = 20;
|
label->fontSize = 20;
|
||||||
label->text = ""
|
label->text = ""
|
||||||
"Welcome!\n"
|
"Welcome!\n"
|
||||||
|
"\n"
|
||||||
"This is a special web-assembly version of Cardinal, "
|
"This is a special web-assembly version of Cardinal, "
|
||||||
"allowing you to enjoy eurorack-style modules directly in your browser.\n"
|
"allowing you to enjoy eurorack-style modules directly in your browser.\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -144,13 +146,26 @@ struct WasmWelcomeDialog : rack::widget::OpaqueWidget
|
||||||
"Proceed with caution and have fun!";
|
"Proceed with caution and have fun!";
|
||||||
contentLayout->addChild(label);
|
contentLayout->addChild(label);
|
||||||
|
|
||||||
struct AsyncDismissButton : Button {
|
struct JoinDiscussionButton : Button {
|
||||||
|
WasmWelcomeDialog* dialog;
|
||||||
|
void onAction(const ActionEvent& e) override {
|
||||||
|
patchUtils::openBrowser("https://github.com/DISTRHO/Cardinal/issues/287");
|
||||||
|
dialog->getParent()->requestDelete();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
JoinDiscussionButton* const discussionButton = new JoinDiscussionButton;
|
||||||
|
discussionButton->box.size.x = buttonWidth;
|
||||||
|
discussionButton->text = "Join discussion";
|
||||||
|
discussionButton->dialog = this;
|
||||||
|
buttonLayout->addChild(discussionButton);
|
||||||
|
|
||||||
|
struct DismissButton : Button {
|
||||||
WasmWelcomeDialog* dialog;
|
WasmWelcomeDialog* dialog;
|
||||||
void onAction(const ActionEvent& e) override {
|
void onAction(const ActionEvent& e) override {
|
||||||
dialog->getParent()->requestDelete();
|
dialog->getParent()->requestDelete();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
AsyncDismissButton* const dismissButton = new AsyncDismissButton;
|
DismissButton* const dismissButton = new DismissButton;
|
||||||
dismissButton->box.size.x = buttonWidth;
|
dismissButton->box.size.x = buttonWidth;
|
||||||
dismissButton->text = "Dismiss";
|
dismissButton->text = "Dismiss";
|
||||||
dismissButton->dialog = this;
|
dismissButton->dialog = this;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue