Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/paint.cc')
-rw-r--r--src/ui/paint.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ui/paint.cc b/src/ui/paint.cc
index 7b8e43f..6dd85b8 100644
--- a/src/ui/paint.cc
+++ b/src/ui/paint.cc
@@ -58,6 +58,20 @@ void Paint::draw_rectangle(const math::Vector2f &global_location, const math::Ve
end();
}
+void Paint::draw_rectangle_gradient(const math::Vector2f &global_location, const math::Vector2f &size, const math::Color & color_left, const math::Color & color_right)
+{
+ gl::begin(gl::Quads);
+ gl::color(color_left);
+ gl::vertex(global_location.x(), global_location.y());
+ gl::color(color_right);
+ gl::vertex(global_location.x() + size.width(), global_location.y());
+ gl::color(color_right);
+ gl::vertex(global_location.x() + size.width(), global_location.y() + size.height());
+ gl::color(color_left);
+ gl::vertex(global_location.x(), global_location.y() + size.height());
+ gl::end();
+}
+
// draw a bitmap
void Paint::draw_bitmap(const math::Vector2f &global_location, const math::Vector2f &size, const std::string &texture)
{