Krotos Modules 3
Loading...
Searching...
No Matches
AssetManagerUI.cpp
Go to the documentation of this file.
1namespace krotos
2{
4 std::atomic<bool> AssetManagerUI::suppressPopups{true};
5
6 URL AssetManagerUI::landingPageURL("https://krotos.studio");
7
8 void AssetManagerUI::alertMissingSamples(const File& presetFile)
9 {
10 auto missingFiles = AssetManager::checkSamplePaths(presetFile);
11 if (missingFiles.isNotEmpty())
12 {
13 AlertWindow::showMessageBoxAsync(AlertWindow::AlertIconType::NoIcon, "Preset missing assets", missingFiles);
14 }
15 }
16
18 {
19 auto dismissedCallback = ModalCallbackFunction::create([=](int isDismissed) {
20 if (!isDismissed) // due to need to swap the buttons around, this condition looks weird
21 {
22 jassert(landingPageURL.isWellFormed());
23 landingPageURL.launchInDefaultBrowser();
24 }
25 m_alertShowing = false;
26 });
27
29 {
30 m_alertShowing = true;
31 auto isDismissed = AlertWindow::showOkCancelBox(
32 AlertWindow::AlertIconType::WarningIcon, "Access Denied",
33 "The requested content is exclusively\navailable to subscribers.\n\nTo gain access to this premium "
34 "content\nplease consider subscribing to our\nservice.",
35 "OK, Got It", "Subscribe", nullptr, dismissedCallback);
36 }
37 }
38} // namespace krotos
static String checkSamplePaths(const File &)
Definition AssetManager.cpp:606
static void alertNonSubscriber()
Definition AssetManagerUI.cpp:17
static void alertMissingSamples(const File &presetFile)
Definition AssetManagerUI.cpp:8
static URL landingPageURL
Definition AssetManagerUI.h:19
static std::atomic< bool > suppressPopups
This is a heavy handed approach to suppressing the subscriber popup which can be a problem when recal...
Definition AssetManagerUI.h:25
static bool m_alertShowing
Definition AssetManagerUI.h:28
Definition AirAbsorptionFilter.cpp:2