Browse Source

Made light glow more intense, added "sampleRate" to settings.json

tags/v0.4.0
Andrew Belt 7 years ago
parent
commit
83f20a6f20
3 changed files with 14 additions and 3 deletions
  1. +2
    -2
      src/app/Light.cpp
  2. +1
    -1
      src/app/RackScene.cpp
  3. +11
    -0
      src/settings.cpp

+ 2
- 2
src/app/Light.cpp View File

@@ -6,7 +6,7 @@ namespace rack {

void Light::draw(NVGcontext *vg) {
float radius = box.size.x / 2.0;
float oradius = radius + 30.0;
float oradius = radius + 40.0;

// Solid
nvgBeginPath(vg);
@@ -31,7 +31,7 @@ void Light::draw(NVGcontext *vg) {
nvgRect(vg, radius - oradius, radius - oradius, 2*oradius, 2*oradius);
NVGpaint paint;
NVGcolor icol = color;
icol.a *= 0.1;
icol.a *= 0.15;
NVGcolor ocol = color;
ocol.a = 0.0;
paint = nvgRadialGradient(vg, radius, radius, radius, oradius, icol, ocol);


+ 1
- 1
src/app/RackScene.cpp View File

@@ -68,7 +68,7 @@ void RackScene::step() {

// Version popup message
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())) {
std::thread t(openBrowser, "https://vcvrack.com/");
t.detach();


+ 11
- 0
src/settings.cpp View File

@@ -1,6 +1,7 @@
#include "settings.hpp"
#include "app.hpp"
#include "gui.hpp"
#include "engine.hpp"
#include "plugin.hpp"
#include <jansson.h>

@@ -30,6 +31,11 @@ static json_t *settingsToJson() {
json_t *allowCursorLockJ = json_boolean(gAllowCursorLock);
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;
}

@@ -53,6 +59,11 @@ static void settingsFromJson(json_t *rootJ) {
json_t *allowCursorLockJ = json_object_get(rootJ, "allowCursorLock");
if (allowCursorLockJ)
gAllowCursorLock = json_is_true(allowCursorLockJ);

// sampleRate
json_t *sampleRateJ = json_object_get(rootJ, "sampleRate");
if (sampleRateJ)
gSampleRate = json_number_value(sampleRateJ);
}




Loading…
Cancel
Save