diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-08-26 17:34:25 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-08-26 17:38:25 -0300 |
commit | ec49f41e19f1088b1bc8df4e8ef360270aa34204 (patch) | |
tree | 763e70d166d6ca41c8795aceacfdf53dd7c9020f /modules/visual_script/visual_script_nodes.h | |
parent | 963ed2d9fae503f82754d11b5ce24182489839f8 (diff) |
Even more work on visual script editor:
-Added constructor nodes, specialized and conversion ones.
-Cleaned up how unconnected input default values are shown and edited (much cleaner)
-Dragging scene nodes into graph makes a call dialog appear by deault
-Dragging properties into graph is set by default, not get
-fixed dragging internal functions into graph
Diffstat (limited to 'modules/visual_script/visual_script_nodes.h')
-rw-r--r-- | modules/visual_script/visual_script_nodes.h | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h index 11b6a32605..4228bd86f9 100644 --- a/modules/visual_script/visual_script_nodes.h +++ b/modules/visual_script/visual_script_nodes.h @@ -622,7 +622,6 @@ class VisualScriptSubCall: public VisualScriptNode { protected: - virtual bool _use_builtin_script() const { return true; } static void _bind_methods(); public: @@ -659,8 +658,6 @@ class VisualScriptComment: public VisualScriptNode { Size2 size; protected: - virtual bool _use_builtin_script() const { return true; } - static void _bind_methods(); public: virtual int get_output_sequence_port_count() const; @@ -695,6 +692,50 @@ public: VisualScriptComment(); }; +class VisualScriptConstructor: public VisualScriptNode { + + OBJ_TYPE(VisualScriptConstructor,VisualScriptNode) + + + Variant::Type type; + MethodInfo constructor; + +protected: + + virtual bool _use_builtin_script() const { return true; } + + static void _bind_methods(); +public: + virtual int get_output_sequence_port_count() const; + virtual bool has_input_sequence_port() const; + + + virtual String get_output_sequence_port_text(int p_port) const; + + + virtual int get_input_value_port_count() const; + virtual int get_output_value_port_count() const; + + + virtual PropertyInfo get_input_value_port_info(int p_idx) const; + virtual PropertyInfo get_output_value_port_info(int p_idx) const; + + virtual String get_caption() const; + virtual String get_text() const; + virtual String get_category() const; + + void set_constructor_type(Variant::Type p_type); + Variant::Type get_constructor_type() const; + + void set_constructor(const Dictionary& p_info); + Dictionary get_constructor() const; + + virtual VisualScriptNodeInstance* instance(VisualScriptInstance* p_instance); + + VisualScriptConstructor(); +}; + void register_visual_script_nodes(); +void unregister_visual_script_nodes(); #endif // VISUAL_SCRIPT_NODES_H |