summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser/BiomeView.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-14 22:20:16 +0200
committerMattes D <github@xoft.cz>2014-09-14 22:20:16 +0200
commitddf130f849f81670254ea2baf79fd06adcc0f302 (patch)
tree7dda9ba798ba6ce8d20ec98d987e69a29b287018 /Tools/QtBiomeVisualiser/BiomeView.h
parentQtBiomeVisualiser: Added mouse and keyboard view control. (diff)
downloadcuberite-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 'Tools/QtBiomeVisualiser/BiomeView.h')
-rw-r--r--Tools/QtBiomeVisualiser/BiomeView.h9
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();
};