diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/convex_polygon_shape_2d.cpp | 6 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 4 | ||||
-rw-r--r-- | scene/resources/material.cpp | 4 | ||||
-rw-r--r-- | scene/resources/shader_graph.cpp | 2 | ||||
-rw-r--r-- | scene/resources/shape_2d.cpp | 4 |
5 files changed, 14 insertions, 6 deletions
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp index a1137ba614..86cf818ac3 100644 --- a/scene/resources/convex_polygon_shape_2d.cpp +++ b/scene/resources/convex_polygon_shape_2d.cpp @@ -30,6 +30,8 @@ #include "servers/physics_2d_server.h" #include "servers/visual_server.h" +#include "geometry.h" + void ConvexPolygonShape2D::_update_shape() { Physics2DServer::get_singleton()->shape_set_data(get_rid(),points); @@ -40,7 +42,9 @@ void ConvexPolygonShape2D::_update_shape() { void ConvexPolygonShape2D::set_point_cloud(const Vector<Vector2>& p_points) { - + Vector<Point2> hull=Geometry::convex_hull_2d(p_points); + ERR_FAIL_COND(hull.size()<3); + set_points(hull); } void ConvexPolygonShape2D::set_points(const Vector<Vector2>& p_points) { diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 25407a5b84..33e1eb338e 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -709,6 +709,10 @@ void make_default_theme() { t->set_stylebox("button_pressed","Tabs", make_stylebox( button_pressed_png,4,4,4,4) ); t->set_stylebox("button","Tabs", make_stylebox( button_normal_png,4,4,4,4) ); + t->set_icon("increment","Tabs",make_icon( scroll_button_right_png)); + t->set_icon("increment_hilite","Tabs",make_icon( scroll_button_right_hl_png)); + t->set_icon("decrement","Tabs",make_icon( scroll_button_left_png)); + t->set_icon("decrement_hilite","Tabs",make_icon( scroll_button_left_hl_png)); t->set_font("font","Tabs", default_font ); diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index b4ea60cb8d..51d8be3294 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -572,8 +572,8 @@ void ShaderMaterial::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_shader","shader:Shader"), &ShaderMaterial::set_shader ); ObjectTypeDB::bind_method(_MD("get_shader:Shader"), &ShaderMaterial::get_shader ); - ObjectTypeDB::bind_method(_MD("set_shader_param","param","value:var"), &ShaderMaterial::set_shader_param); - ObjectTypeDB::bind_method(_MD("get_shader_param:var","param"), &ShaderMaterial::get_shader_param); + ObjectTypeDB::bind_method(_MD("set_shader_param","param","value:Variant"), &ShaderMaterial::set_shader_param); + ObjectTypeDB::bind_method(_MD("get_shader_param:Variant","param"), &ShaderMaterial::get_shader_param); ObjectTypeDB::bind_method(_MD("_shader_changed"), &ShaderMaterial::_shader_changed ); } diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp index 7b67eaeda8..f8a14e58a0 100644 --- a/scene/resources/shader_graph.cpp +++ b/scene/resources/shader_graph.cpp @@ -260,7 +260,7 @@ void ShaderGraph::_bind_methods() { ObjectTypeDB::bind_method(_MD("clear","shader_type"),&ShaderGraph::clear); ObjectTypeDB::bind_method(_MD("node_set_state","shader_type","id","state"),&ShaderGraph::node_set_state); - ObjectTypeDB::bind_method(_MD("node_get_state:var","shader_type","id"),&ShaderGraph::node_get_state); + ObjectTypeDB::bind_method(_MD("node_get_state:Variant","shader_type","id"),&ShaderGraph::node_get_state); ObjectTypeDB::bind_method(_MD("_set_data"),&ShaderGraph::_set_data); ObjectTypeDB::bind_method(_MD("_get_data"),&ShaderGraph::_get_data); diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp index 31b28ee892..56fd8e212e 100644 --- a/scene/resources/shape_2d.cpp +++ b/scene/resources/shape_2d.cpp @@ -108,8 +108,8 @@ void Shape2D::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_custom_solver_bias"),&Shape2D::get_custom_solver_bias); ObjectTypeDB::bind_method(_MD("collide","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide); ObjectTypeDB::bind_method(_MD("collide_with_motion","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion); - ObjectTypeDB::bind_method(_MD("collide_and_get_contacts:var","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide_and_get_contacts); - ObjectTypeDB::bind_method(_MD("collide_with_motion_and_get_contacts:var","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion_and_get_contacts); + ObjectTypeDB::bind_method(_MD("collide_and_get_contacts:Variant","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide_and_get_contacts); + ObjectTypeDB::bind_method(_MD("collide_with_motion_and_get_contacts:Variant","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion_and_get_contacts); ADD_PROPERTY( PropertyInfo(Variant::REAL,"custom_solver_bias",PROPERTY_HINT_RANGE,"0,1,0.001"),_SCS("set_custom_solver_bias"),_SCS("get_custom_solver_bias")); } |