diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-07-17 12:15:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-17 12:15:22 +0200 |
commit | adec9c31683c27734e0f241cd431e8b0611953ad (patch) | |
tree | f08ee8162578165bbbde6a09f96988976f3d9740 | |
parent | 1f1b45c7ec00bbbf5abe0cbb92938b150a5d01f2 (diff) | |
parent | e51a94905d4b866475c16fe1a2b20a7db5d61e81 (diff) |
Merge pull request #20150 from ibrahn/fix-scrollbar-atlas
fix scrollbar icons with atlas texture.
-rw-r--r-- | scene/gui/scroll_bar.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 6ec67aca6b..e5bd1c453d 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -257,9 +257,7 @@ void ScrollBar::_notification(int p_what) { Point2 ofs; - VisualServer *vs = VisualServer::get_singleton(); - - vs->canvas_item_add_texture_rect(ci, Rect2(Point2(), decr->get_size()), decr->get_rid()); + decr->draw(ci, Point2()); if (orientation == HORIZONTAL) ofs.x += decr->get_width(); @@ -280,7 +278,7 @@ void ScrollBar::_notification(int p_what) { else ofs.height += area.height; - vs->canvas_item_add_texture_rect(ci, Rect2(ofs, decr->get_size()), incr->get_rid()); + incr->draw(ci, ofs); Rect2 grabber_rect; if (orientation == HORIZONTAL) { |