Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-06-02 16:20:47 +0000
committerStijn Buys <ingar@osirion.org>2008-06-02 16:20:47 +0000
commit8c17868585e2a12f947ec387947c4521ef21d775 (patch)
tree83d36d3dc36698aa0d36a3b9b9a8bb0826520586 /src/client/view.cc
parent0f87d2fd05786f7ab128d4a041673f6fb085139f (diff)
keyboard binds
Diffstat (limited to 'src/client/view.cc')
-rw-r--r--src/client/view.cc31
1 files changed, 21 insertions, 10 deletions
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);