|
|
@@ -26,6 +26,7 @@ math::Vec windowSize = math::Vec(1024, 768); |
|
|
|
math::Vec windowPos = math::Vec(NAN, NAN); |
|
|
|
float zoom = 0.0; |
|
|
|
bool invertZoom = false; |
|
|
|
float pixelRatio = 0.0; |
|
|
|
float cableOpacity = 0.5; |
|
|
|
float cableTension = 0.5; |
|
|
|
float rackBrightness = 1.0; |
|
|
@@ -104,6 +105,8 @@ json_t* toJson() { |
|
|
|
|
|
|
|
json_object_set_new(rootJ, "invertZoom", json_boolean(invertZoom)); |
|
|
|
|
|
|
|
json_object_set_new(rootJ, "pixelRatio", json_real(pixelRatio)); |
|
|
|
|
|
|
|
json_object_set_new(rootJ, "cableOpacity", json_real(cableOpacity)); |
|
|
|
|
|
|
|
json_object_set_new(rootJ, "cableTension", json_real(cableTension)); |
|
|
@@ -224,6 +227,10 @@ void fromJson(json_t* rootJ) { |
|
|
|
if (invertZoomJ) |
|
|
|
invertZoom = json_boolean_value(invertZoomJ); |
|
|
|
|
|
|
|
json_t* pixelRatioJ = json_object_get(rootJ, "pixelRatio"); |
|
|
|
if (pixelRatioJ) |
|
|
|
pixelRatio = json_number_value(pixelRatioJ); |
|
|
|
|
|
|
|
json_t* cableOpacityJ = json_object_get(rootJ, "cableOpacity"); |
|
|
|
if (cableOpacityJ) |
|
|
|
cableOpacity = json_number_value(cableOpacityJ); |
|
|
|