diff options
author | Geequlim <geequlim@gmail.com> | 2016-06-03 22:11:10 +0800 |
---|---|---|
committer | Geequlim <geequlim@gmail.com> | 2016-06-05 00:45:53 +0800 |
commit | fdf914e53e80f49153ea7f999f816010c0ad8e50 (patch) | |
tree | fbde5739fe8e261b2a6f17ca5787cd69714facf4 /servers/visual_server.cpp | |
parent | 5b6a8eca94301410b066def0303a132bdc833dd4 (diff) |
Add texture region support for stylebox render
Diffstat (limited to 'servers/visual_server.cpp')
-rw-r--r-- | servers/visual_server.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 5ac0e5b5d5..570a5a6ee4 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -705,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) { @@ -822,5 +822,3 @@ VisualServer::~VisualServer() { singleton=NULL; } - - |