diff options
Diffstat (limited to 'src/ui')
-rwxr-xr-x | src/ui/modelview.cc | 12 |
1 files 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; |