diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-11 00:52:51 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-11 00:52:51 -0300 |
commit | bc26f905817945300d397696330d1ab04a1af33c (patch) | |
tree | d06338399c8ea410042f6631fb3db3efcc100b05 /modules/visual_script | |
parent | 710692278d1353aad08bc7bceb655afc1d6c950c (diff) |
Type renames:
Matrix32 -> Transform2D
Matrix3 -> Basis
AABB -> Rect3
RawArray -> PoolByteArray
IntArray -> PoolIntArray
FloatArray -> PoolFloatArray
Vector2Array -> PoolVector2Array
Vector3Array -> PoolVector3Array
ColorArray -> PoolColorArray
Diffstat (limited to 'modules/visual_script')
-rw-r--r-- | modules/visual_script/visual_script.cpp | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script.h | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script_builtin_funcs.cpp | 18 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 26 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.h | 2 |
5 files changed, 25 insertions, 25 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 418a42bc18..08796b3868 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -2525,7 +2525,7 @@ int VisualScriptLanguage::find_function(const String& p_function,const String& p return -1; } -String VisualScriptLanguage::make_function(const String& p_class,const String& p_name,const StringArray& p_args) const { +String VisualScriptLanguage::make_function(const String& p_class,const String& p_name,const PoolStringArray& p_args) const { return String(); } diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h index d030dcc2cb..acd1c3a670 100644 --- a/modules/visual_script/visual_script.h +++ b/modules/visual_script/visual_script.h @@ -560,7 +560,7 @@ public: virtual Script *create_script() const; virtual bool has_named_classes() const; virtual int find_function(const String& p_function,const String& p_code) const; - virtual String make_function(const String& p_class,const String& p_name,const StringArray& p_args) const; + virtual String make_function(const String& p_class,const String& p_name,const PoolStringArray& p_args) const; virtual void auto_indent_code(String& p_code,int p_from_line,int p_to_line) const; virtual void add_global_constant(const StringName& p_variable,const Variant& p_value); diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp index 58dbfbc5ad..bd2647d928 100644 --- a/modules/visual_script/visual_script_builtin_funcs.cpp +++ b/modules/visual_script/visual_script_builtin_funcs.cpp @@ -404,7 +404,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const } break; case BYTES_TO_VAR: { - return PropertyInfo(Variant::RAW_ARRAY,"bytes"); + return PropertyInfo(Variant::POOL_BYTE_ARRAY,"bytes"); } break; case FUNC_MAX:{} } @@ -548,7 +548,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons } break; case VAR_TO_BYTES: { - t=Variant::RAW_ARRAY; + t=Variant::POOL_BYTE_ARRAY; } break; case BYTES_TO_VAR: { @@ -1058,7 +1058,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func,const Variant** p_inp case VisualScriptBuiltinFunc::VAR_TO_BYTES: { - ByteArray barr; + PoolByteArray barr; int len; Error err = encode_variant(*p_inputs[0],NULL,len); if (err) { @@ -1071,7 +1071,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func,const Variant** p_inp barr.resize(len); { - ByteArray::Write w = barr.write(); + PoolByteArray::Write w = barr.write(); encode_variant(*p_inputs[0],w.ptr(),len); } @@ -1079,24 +1079,24 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func,const Variant** p_inp } break; case VisualScriptBuiltinFunc::BYTES_TO_VAR: { - if (p_inputs[0]->get_type()!=Variant::RAW_ARRAY) { + if (p_inputs[0]->get_type()!=Variant::POOL_BYTE_ARRAY) { r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument=0; - r_error.expected=Variant::RAW_ARRAY; + r_error.expected=Variant::POOL_BYTE_ARRAY; return; } - ByteArray varr=*p_inputs[0]; + PoolByteArray varr=*p_inputs[0]; Variant ret; { - ByteArray::Read r=varr.read(); + PoolByteArray::Read r=varr.read(); Error err = decode_variant(ret,r.ptr(),varr.size(),NULL); if (err!=OK) { r_error_str=RTR("Not enough bytes for decoding bytes, or invalid format."); r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument=0; - r_error.expected=Variant::RAW_ARRAY; + r_error.expected=Variant::POOL_BYTE_ARRAY; return; } diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index c359c02205..6f3ea3b4ad 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -326,11 +326,11 @@ static Color _color_from_type(Variant::Type p_type) { case Variant::VECTOR2: color = Color::html("bd91f1"); break; case Variant::RECT2: color = Color::html("f191a5"); break; case Variant::VECTOR3: color = Color::html("d67dee"); break; - case Variant::MATRIX32: color = Color::html("c4ec69"); break; + case Variant::TRANSFORM2D: color = Color::html("c4ec69"); break; case Variant::PLANE: color = Color::html("f77070"); break; case Variant::QUAT: color = Color::html("ec69a3"); break; - case Variant::_AABB: color = Color::html("ee7991"); break; - case Variant::MATRIX3: color = Color::html("e3ec69"); break; + case Variant::RECT3: color = Color::html("ee7991"); break; + case Variant::BASIS: color = Color::html("e3ec69"); break; case Variant::TRANSFORM: color = Color::html("f6a86e"); break; case Variant::COLOR: color = Color::html("9dff70"); break; @@ -342,13 +342,13 @@ static Color _color_from_type(Variant::Type p_type) { case Variant::DICTIONARY: color = Color::html("77edb1"); break; case Variant::ARRAY: color = Color::html("e0e0e0"); break; - case Variant::RAW_ARRAY: color = Color::html("aaf4c8"); break; - case Variant::INT_ARRAY: color = Color::html("afdcf5"); break; - case Variant::REAL_ARRAY: color = Color::html("97e7f8"); break; - case Variant::STRING_ARRAY: color = Color::html("9dc4f2"); break; - case Variant::VECTOR2_ARRAY: color = Color::html("d1b3f5"); break; - case Variant::VECTOR3_ARRAY: color = Color::html("df9bf2"); break; - case Variant::COLOR_ARRAY: color = Color::html("e9ff97"); break; + case Variant::POOL_BYTE_ARRAY: color = Color::html("aaf4c8"); break; + case Variant::POOL_INT_ARRAY: color = Color::html("afdcf5"); break; + case Variant::POOL_REAL_ARRAY: color = Color::html("97e7f8"); break; + case Variant::POOL_STRING_ARRAY: color = Color::html("9dc4f2"); break; + case Variant::POOL_VECTOR2_ARRAY: color = Color::html("d1b3f5"); break; + case Variant::POOL_VECTOR3_ARRAY: color = Color::html("df9bf2"); break; + case Variant::POOL_COLOR_ARRAY: color = Color::html("e9ff97"); break; default: color.set_hsv(p_type/float(Variant::VARIANT_MAX),0.7,0.7); @@ -438,11 +438,11 @@ void VisualScriptEditor::_update_graph(int p_only_id) { Control::get_icon("MiniVector2","EditorIcons"), Control::get_icon("MiniRect2","EditorIcons"), Control::get_icon("MiniVector3","EditorIcons"), - Control::get_icon("MiniMatrix32","EditorIcons"), + Control::get_icon("MiniTransform2D","EditorIcons"), Control::get_icon("MiniPlane","EditorIcons"), Control::get_icon("MiniQuat","EditorIcons"), Control::get_icon("MiniAabb","EditorIcons"), - Control::get_icon("MiniMatrix3","EditorIcons"), + Control::get_icon("MiniBasis","EditorIcons"), Control::get_icon("MiniTransform","EditorIcons"), Control::get_icon("MiniColor","EditorIcons"), Control::get_icon("MiniImage","EditorIcons"), @@ -2321,7 +2321,7 @@ bool VisualScriptEditor::goto_method(const String& p_method){ return true; } -void VisualScriptEditor::add_callback(const String& p_function,StringArray p_args){ +void VisualScriptEditor::add_callback(const String& p_function,PoolStringArray p_args){ if (script->has_function(p_function)) { edited_func=p_function; diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index dbd5d220c2..e120bdc655 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -225,7 +225,7 @@ public: virtual void reload(bool p_soft); virtual void get_breakpoints(List<int> *p_breakpoints); virtual bool goto_method(const String& p_method); - virtual void add_callback(const String& p_function,StringArray p_args); + virtual void add_callback(const String& p_function,PoolStringArray p_args); virtual void update_settings(); virtual void set_debugger_active(bool p_active); virtual void set_tooltip_request_func(String p_method,Object* p_obj); |