From c157f244c1d25fcc5b76c5f73767e2f64cc13afe Mon Sep 17 00:00:00 2001
From: Stijn Buys <ingar@osirion.org>
Date: Mon, 29 Nov 2010 16:22:32 +0000
Subject: Improved ui::ModelView scaling.

---
 src/ui/modelview.cc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc
index dc6ddfc..0b01fb2 100755
--- a/src/ui/modelview.cc
+++ b/src/ui/modelview.cc
@@ -25,6 +25,7 @@ ModelView::ModelView(Widget *parent, const char *modelname) : Widget(parent)
 
 	set_modelname(modelname);
 
+	modelview_radius = 0.75f;
 	modelview_zoom = 1.0f;
 	modelview_dragging = false;
 	
@@ -55,7 +56,6 @@ void ModelView::set_modelname(const char *modelname)
 	modelview_axis.change_direction(180);
 	modelview_axis.change_pitch(-15);
 	modelview_zoom = 1.0f;
-	modelview_radius = 0.75f;
 }
 
 void ModelView::set_color(const math::Color & color)
@@ -66,20 +66,20 @@ void ModelView::set_color(const math::Color & color)
 void ModelView::set_zoom(const float zoom)
 {
 	modelview_zoom = zoom;
-	math::clamp(modelview_zoom, 1.0f, 10.0f);
+	math::clamp(modelview_zoom, 1.0f, 5.0f);
 }
 
 bool ModelView::on_keypress(const int key, const unsigned int modifier)
 {
 	if (key == 512 + SDL_BUTTON_WHEELUP) {
-		modelview_zoom -= 0.5f;
+		modelview_zoom -= 0.25f;
 		if (modelview_zoom < 1.0f)
 			modelview_zoom = 1.0f;
 		return true;
 	} else 	if (key == 512 + SDL_BUTTON_WHEELDOWN) {
-		modelview_zoom += 0.5f;
-		if (modelview_zoom > 10.0f)
-			modelview_zoom = 10.0f;
+		modelview_zoom += 0.25f;
+		if (modelview_zoom > 5.0f)
+			modelview_zoom = 5.0f;
 		return true;
 	} else if (key == 512 + SDL_BUTTON_LEFT) {
 		modelview_dragging = true;
-- 
cgit v1.2.3