diff options
Diffstat (limited to 'servers/visual_server.cpp')
-rw-r--r-- | servers/visual_server.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 17d5b16b9f..570a5a6ee4 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -355,8 +355,12 @@ void VisualServer::_bind_methods() { ObjectTypeDB::bind_method(_MD("texture_get_flags"),&VisualServer::texture_get_flags ); ObjectTypeDB::bind_method(_MD("texture_get_width"),&VisualServer::texture_get_width ); ObjectTypeDB::bind_method(_MD("texture_get_height"),&VisualServer::texture_get_height ); + + ObjectTypeDB::bind_method(_MD("texture_set_shrink_all_x2_on_set_data","shrink"),&VisualServer::texture_set_shrink_all_x2_on_set_data ); + #ifndef _3D_DISABLED + ObjectTypeDB::bind_method(_MD("shader_create","mode"),&VisualServer::shader_create,DEFVAL(SHADER_MATERIAL)); ObjectTypeDB::bind_method(_MD("shader_set_mode","shader","mode"),&VisualServer::shader_set_mode); @@ -701,10 +705,10 @@ void VisualServer::_bind_methods() { } -void VisualServer::_canvas_item_add_style_box(RID p_item, const Rect2& p_rect, RID p_texture,const Vector<float>& p_margins, const Color& p_modulate) { +void VisualServer::_canvas_item_add_style_box(RID p_item, const Rect2& p_rect, const Rect2& p_source, RID p_texture,const Vector<float>& p_margins, const Color& p_modulate) { ERR_FAIL_COND(p_margins.size()!=4); - canvas_item_add_style_box(p_item, p_rect, p_texture,Vector2(p_margins[0],p_margins[1]),Vector2(p_margins[2],p_margins[3]),true,p_modulate); + canvas_item_add_style_box(p_item,p_rect,p_source,p_texture,Vector2(p_margins[0],p_margins[1]),Vector2(p_margins[2],p_margins[3]),true,p_modulate); } void VisualServer::_camera_set_orthogonal(RID p_camera,float p_size,float p_z_near,float p_z_far) { @@ -818,5 +822,3 @@ VisualServer::~VisualServer() { singleton=NULL; } - - |