Browse Source

Add manualUrl to plugin::Model.

tags/v2.0.0
Andrew Belt 5 years ago
parent
commit
90e70060c3
3 changed files with 10 additions and 1 deletions
  1. +2
    -1
      include/app/CableWidget.hpp
  2. +3
    -0
      include/plugin/Model.hpp
  3. +5
    -0
      src/plugin/Model.cpp

+ 2
- 1
include/app/CableWidget.hpp View File

@@ -23,10 +23,11 @@ struct CableWidget : widget::OpaqueWidget {
CableWidget(); CableWidget();
~CableWidget(); ~CableWidget();
bool isComplete(); bool isComplete();
/** From input/output ports, re-creates a cable and adds it to the Engine. */
/** Based on the input/output ports, re-creates the cable and removes/adds it to the Engine. */
void updateCable(); void updateCable();
/** From a cable, sets the input/output ports. /** From a cable, sets the input/output ports.
Cable must already be added to the Engine. Cable must already be added to the Engine.
Adopts ownership.
*/ */
void setCable(engine::Cable* cable); void setCable(engine::Cable* cable);
math::Vec getInputPos(); math::Vec getInputPos();


+ 3
- 0
include/plugin/Model.hpp View File

@@ -37,6 +37,9 @@ struct Model {
std::vector<int> tags; std::vector<int> tags;
/** A one-line summary of the module's purpose */ /** A one-line summary of the module's purpose */
std::string description; std::string description;
/** The manual of the module. HTML, PDF, or GitHub readme/wiki are fine.
*/
std::string manualUrl;


virtual ~Model() {} virtual ~Model() {}
/** Creates a Module. */ /** Creates a Module. */


+ 5
- 0
src/plugin/Model.cpp View File

@@ -37,6 +37,11 @@ void Model::fromJson(json_t* rootJ) {
} }
} }


// manualUrl
json_t* manualUrlJ = json_object_get(rootJ, "manualUrl");
if (manualUrlJ)
manualUrl = json_string_value(manualUrlJ);

// Preset paths // Preset paths
presetPaths.clear(); presetPaths.clear();
std::string presetDir = asset::plugin(plugin, "presets/" + slug); std::string presetDir = asset::plugin(plugin, "presets/" + slug);


Loading…
Cancel
Save