diff options
| -rw-r--r-- | rotord/src/nodes_drawing.h | 2 | ||||
| -rw-r--r-- | rotord/src/rotor.cpp | 6 | ||||
| -rw-r--r-- | rotord/src/rotor.h | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/rotord/src/nodes_drawing.h b/rotord/src/nodes_drawing.h index f2ed0ae..cbc8702 100644 --- a/rotord/src/nodes_drawing.h +++ b/rotord/src/nodes_drawing.h @@ -128,8 +128,8 @@ namespace Rotor { title="UI_text"; description="Draws text entered by the user"; create_attribute("text","Text to draw","Text","hello, world!"); + create_attribute("UItype" "UI type","UI type to use","text",{"text"}); NODEID="22b47bea-52a9-11e3-b2b3-74d02b29f6a6"; - UItype="text"; }; UI_text(map<string,string> &settings):UI_text() { base_settings(settings); diff --git a/rotord/src/rotor.cpp b/rotord/src/rotor.cpp index afb47e0..36eb2fa 100644 --- a/rotord/src/rotor.cpp +++ b/rotord/src/rotor.cpp @@ -8,6 +8,7 @@ #include "nodes_drawing.h" #include "nodes_filters.h" #include "nodes_transform.h" +#include "nodes_UI.h" using namespace Rotor; using Poco::Logger; @@ -79,6 +80,7 @@ Node_factory::Node_factory(){ category["UI"]=vector<Node*>(); add_type("ui_text",new UI_text(),category["UI"]); + add_type("number",new Number(),category["UI"]); } double Signal_input::get_time_used(){ @@ -162,7 +164,7 @@ Json::Value Node_factory::list_node(Rotor::Node* _node){ if (dynamic_cast<Image_node*> (_node)!=nullptr) node["output"]="image"; node["description"]=_node->description; node["NODEID"]=_node->NODEID; - node["UItype"]=_node->UItype; + //node["UItype"]=_node->UItype; if (_node->inputs.size()){ node["signal_inputs"]=Json::arrayValue; for (auto& input: _node->inputs) { @@ -232,7 +234,7 @@ void Node_factory::list_node(Rotor::Node* type,xmlIO XML,int i){ XML.addAttribute("node","title",type->title,i); XML.addAttribute("node","description",type->description,i); XML.addAttribute("node","NODEID",type->NODEID,i); - XML.addAttribute("node","UItype",type->UItype,i); + //XML.addAttribute("node","UItype",type->UItype,i); if (dynamic_cast<Signal_node*> (type)!=nullptr) XML.addAttribute("node","output","signal",i); if (dynamic_cast<Image_node*> (type)!=nullptr) XML.addAttribute("node","output","image",i); XML.pushTag("node",i); diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 0013313..766802f 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -338,7 +338,7 @@ namespace Rotor { }; class Node{ public: - Node(){duplicate_inputs=false;UItype="";}; + Node(){duplicate_inputs=false;}; virtual Node* clone(map<string,string> &_settings)=0; //pure virtual virtual ~Node(){ for (auto a: attributes) delete a.second; @@ -379,7 +379,6 @@ namespace Rotor { string ID; string NODEID; string title; - string UItype; bool duplicate_inputs; string find_setting(map<string,string> &settings,string key,string def=""){ if (settings.find(key)!=settings.end()) return settings[key]; else return def;}; double find_setting(map<string,string> &settings,string key,double def){ if (settings.find(key)!=settings.end()) return toFloat(settings[key]); else return def;}; |
