diff options
author | Stijn Buys <ingar@osirion.org> | 2013-11-09 13:17:57 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-11-09 13:17:57 +0000 |
commit | be06560334a8f9b5e290a5a5ef1dc4916c55b691 (patch) | |
tree | c5799a0747ffd4ec2b9cc60ac97d383acc37b538 /src/ui/paint.cc | |
parent | 41fcb9f3915db02c9255dc62f03d6b4a55e5b6d3 (diff) |
Added reputation bars.
Diffstat (limited to 'src/ui/paint.cc')
-rw-r--r-- | src/ui/paint.cc | 14 |
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) { |