@@ -6,7 +6,7 @@ namespace rack { | |||||
void Light::draw(NVGcontext *vg) { | void Light::draw(NVGcontext *vg) { | ||||
float radius = box.size.x / 2.0; | float radius = box.size.x / 2.0; | ||||
float oradius = radius + 30.0; | |||||
float oradius = radius + 40.0; | |||||
// Solid | // Solid | ||||
nvgBeginPath(vg); | nvgBeginPath(vg); | ||||
@@ -31,7 +31,7 @@ void Light::draw(NVGcontext *vg) { | |||||
nvgRect(vg, radius - oradius, radius - oradius, 2*oradius, 2*oradius); | nvgRect(vg, radius - oradius, radius - oradius, 2*oradius, 2*oradius); | ||||
NVGpaint paint; | NVGpaint paint; | ||||
NVGcolor icol = color; | NVGcolor icol = color; | ||||
icol.a *= 0.1; | |||||
icol.a *= 0.15; | |||||
NVGcolor ocol = color; | NVGcolor ocol = color; | ||||
ocol.a = 0.0; | ocol.a = 0.0; | ||||
paint = nvgRadialGradient(vg, radius, radius, radius, oradius, icol, ocol); | paint = nvgRadialGradient(vg, radius, radius, radius, oradius, icol, ocol); | ||||
@@ -68,7 +68,7 @@ void RackScene::step() { | |||||
// Version popup message | // Version popup message | ||||
if (!newVersion.empty()) { | if (!newVersion.empty()) { | ||||
std::string versionMessage = stringf("Rack %s is available.\n\nYou have Rack %s.\n\nWould you like to download the new version on the website?", newVersion, gApplicationVersion.c_str()); | |||||
std::string versionMessage = stringf("Rack %s is available.\n\nYou have Rack %s.\n\nWould you like to download the new version on the website?", newVersion.c_str(), gApplicationVersion.c_str()); | |||||
if (osdialog_message(OSDIALOG_INFO, OSDIALOG_YES_NO, versionMessage.c_str())) { | if (osdialog_message(OSDIALOG_INFO, OSDIALOG_YES_NO, versionMessage.c_str())) { | ||||
std::thread t(openBrowser, "https://vcvrack.com/"); | std::thread t(openBrowser, "https://vcvrack.com/"); | ||||
t.detach(); | t.detach(); | ||||
@@ -1,6 +1,7 @@ | |||||
#include "settings.hpp" | #include "settings.hpp" | ||||
#include "app.hpp" | #include "app.hpp" | ||||
#include "gui.hpp" | #include "gui.hpp" | ||||
#include "engine.hpp" | |||||
#include "plugin.hpp" | #include "plugin.hpp" | ||||
#include <jansson.h> | #include <jansson.h> | ||||
@@ -30,6 +31,11 @@ static json_t *settingsToJson() { | |||||
json_t *allowCursorLockJ = json_boolean(gAllowCursorLock); | json_t *allowCursorLockJ = json_boolean(gAllowCursorLock); | ||||
json_object_set_new(rootJ, "allowCursorLock", allowCursorLockJ); | json_object_set_new(rootJ, "allowCursorLock", allowCursorLockJ); | ||||
// sampleRate | |||||
float sampleRate = gSampleRate; | |||||
json_t *sampleRateJ = json_real(sampleRate); | |||||
json_object_set_new(rootJ, "sampleRate", sampleRateJ); | |||||
return rootJ; | return rootJ; | ||||
} | } | ||||
@@ -53,6 +59,11 @@ static void settingsFromJson(json_t *rootJ) { | |||||
json_t *allowCursorLockJ = json_object_get(rootJ, "allowCursorLock"); | json_t *allowCursorLockJ = json_object_get(rootJ, "allowCursorLock"); | ||||
if (allowCursorLockJ) | if (allowCursorLockJ) | ||||
gAllowCursorLock = json_is_true(allowCursorLockJ); | gAllowCursorLock = json_is_true(allowCursorLockJ); | ||||
// sampleRate | |||||
json_t *sampleRateJ = json_object_get(rootJ, "sampleRate"); | |||||
if (sampleRateJ) | |||||
gSampleRate = json_number_value(sampleRateJ); | |||||
} | } | ||||