diff options
author | Mattes D <github@xoft.cz> | 2014-09-14 22:20:16 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-14 22:20:16 +0200 |
commit | ddf130f849f81670254ea2baf79fd06adcc0f302 (patch) | |
tree | 7dda9ba798ba6ce8d20ec98d987e69a29b287018 /Tools/QtBiomeVisualiser/BiomeView.h | |
parent | QtBiomeVisualiser: Added mouse and keyboard view control. (diff) | |
download | cuberite-ddf130f849f81670254ea2baf79fd06adcc0f302.tar cuberite-ddf130f849f81670254ea2baf79fd06adcc0f302.tar.gz cuberite-ddf130f849f81670254ea2baf79fd06adcc0f302.tar.bz2 cuberite-ddf130f849f81670254ea2baf79fd06adcc0f302.tar.lz cuberite-ddf130f849f81670254ea2baf79fd06adcc0f302.tar.xz cuberite-ddf130f849f81670254ea2baf79fd06adcc0f302.tar.zst cuberite-ddf130f849f81670254ea2baf79fd06adcc0f302.zip |
Diffstat (limited to '')
-rw-r--r-- | Tools/QtBiomeVisualiser/BiomeView.h | 9 |
1 files changed, 9 insertions, 0 deletions
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(); }; |