From 8c17868585e2a12f947ec387947c4521ef21d775 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 2 Jun 2008 16:20:47 +0000 Subject: keyboard binds --- src/client/view.cc | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'src/client/view.cc') diff --git a/src/client/view.cc b/src/client/view.cc index 6d3f456..d796655 100644 --- a/src/client/view.cc +++ b/src/client/view.cc @@ -190,21 +190,32 @@ void draw_cursor() float crosshair_size = 48.0f; float x = input::mouse_x - (crosshair_size /2); float y = input::mouse_y - (crosshair_size /2); -// 0 + using namespace render; - render::Textures::bind("bitmaps/crosshair"); + math::Color color; - if (cl_crosshaircolor && cl_crosshaircolor->value()) { - std::stringstream colorstr(cl_crosshaircolor->str()); - colorstr >> color; - } + color.a = 0.5f; - if (cl_mousecontrol->value() && input::mouse_deadzone) - color.a = 0.3f; - else - color.a = 0.5f; + if (render::Camera::mode() == render::Camera::Overview) { + render::Textures::bind("bitmaps/crosshairs/aim"); + + } else { + + if (input::mouse_control) { + render::Textures::bind("bitmaps/crosshairs/control"); + + if (cl_crosshaircolor && cl_crosshaircolor->value()) { + std::stringstream colorstr(cl_crosshaircolor->str()); + colorstr >> color; + } + } else { + + render::Textures::bind("bitmaps/crosshairs/aim"); + } + + } gl::color(color); gl::begin(gl::Quads); -- cgit v1.2.3