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 /scene/gui | |
parent | 5b6a8eca94301410b066def0303a132bdc833dd4 (diff) |
Add texture region support for stylebox render
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/patch_9_frame.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/scene/gui/patch_9_frame.cpp b/scene/gui/patch_9_frame.cpp index b6e261714c..c507c3a03f 100644 --- a/scene/gui/patch_9_frame.cpp +++ b/scene/gui/patch_9_frame.cpp @@ -9,10 +9,9 @@ void Patch9Frame::_notification(int p_what) { if (texture.is_null()) return; - Size2 s=get_size(); RID ci = get_canvas_item(); - VS::get_singleton()->canvas_item_add_style_box(ci,Rect2(Point2(),s),texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),draw_center,modulate); + VS::get_singleton()->canvas_item_add_style_box(ci,Rect2(Point2(),s),Rect2(),texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),draw_center,modulate); // draw_texture_rect(texture,Rect2(Point2(),s),false,modulate); /* @@ -128,5 +127,3 @@ Patch9Frame::Patch9Frame() { Patch9Frame::~Patch9Frame() { } - - |