From be06560334a8f9b5e290a5a5ef1dc4916c55b691 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 9 Nov 2013 13:17:57 +0000 Subject: Added reputation bars. --- src/ui/paint.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/ui/paint.cc') 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) { -- cgit v1.2.3