diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/view.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/client/view.cc b/src/client/view.cc index e2a0e88..dc17cce 100644 --- a/src/client/view.cc +++ b/src/client/view.cc @@ -169,6 +169,8 @@ void draw_cursor() math::Color color; color.a = 0.5f; + bool cursor_animated = false; + if (render::Camera::mode() == render::Camera::Overview) { render::Textures::bind("bitmaps/pointers/aim"); @@ -212,6 +214,8 @@ void draw_cursor() } render::Textures::bind("bitmaps/pointers/target"); + cursor_animated = true; + } else if (input::mouse_control) { if (ui_pointercolor) { @@ -237,6 +241,16 @@ void draw_cursor() } + if (cursor_animated) { + gl::push(); + gl::translate(x+pointer_size/2, y+pointer_size/2, 0.0f); + + float angle = core::application()->time()* 0.75f - floorf(core::application()->time() * 0.75f); + angle *= 360.0f; + gl::rotate(angle, math::Vector3f(0, 0, 1.0f)); + gl::translate(-x-pointer_size/2, -y-pointer_size/2, 0.0f); + } + gl::color(color); gl::begin(gl::Quads); @@ -253,6 +267,10 @@ void draw_cursor() gl::vertex(x, y+pointer_size, 0.0f); gl::end(); + + if (cursor_animated) { + gl::pop(); + } } void reset() |