| @@ -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(); | ||||
| @@ -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. */ | ||||
| @@ -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); | ||||