From ddf130f849f81670254ea2baf79fd06adcc0f302 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 14 Sep 2014 22:20:16 +0200 Subject: QtBiomeVisualiser: Extended zoom down below 100%. --- Tools/QtBiomeVisualiser/BiomeView.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Tools/QtBiomeVisualiser/BiomeView.h') diff --git a/Tools/QtBiomeVisualiser/BiomeView.h b/Tools/QtBiomeVisualiser/BiomeView.h index 8aae43df0..61bda45c2 100644 --- a/Tools/QtBiomeVisualiser/BiomeView.h +++ b/Tools/QtBiomeVisualiser/BiomeView.h @@ -49,6 +49,9 @@ protected: /** Set to true when the user has a mouse button depressed, and is dragging the view. */ bool m_IsMouseDragging; + /** Accumulator for the mouse wheel's delta. When the accumulator hits a threshold, the view zooms. */ + int m_MouseWheelDelta; + /** Data used for rendering a chunk that hasn't been loaded yet */ uchar m_EmptyChunkImage[16 * 16 * 4]; @@ -79,6 +82,12 @@ protected: /** Called when the user presses a key. */ virtual void keyPressEvent(QKeyEvent * a_Event) override; + + /** Decreases the zoom level and queues a redraw. */ + void decreaseZoom(); + + /** Increases the zoom level and queues a redraw. */ + void increaseZoom(); }; -- cgit v1.2.3