Skip to content
Narta Xaymar Dirks edited this page Oct 30, 2026 · 7 revisions

Blitz3DBlitzPlusBlitzBasic

MouseZ

MouseZ:Int32

Returns: The wheel position added up since the program started.

Description

The position of the mouse wheel. It starts at 0 and counts up when the wheel is rolled away from you and down when it is rolled towards you.

Differences

  • Fine scrolling wheels and touchpads that report fractions of a notch are rounded to whole steps.
  • The Device argument is a BlitzLLVM extension: the original has no such argument and only knows one mouse.

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
While Not KeyHit(1)
	Cls
	Text 10, 10, "Roll the mouse wheel"
	Text 10, 30, "MouseZ = " + MouseZ()
	Flip
Wend

Related Commands

MouseChanged, MouseDeviceConnected, MouseDeviceCount, MouseDeviceName, MouseDown, MouseHit, MouseWait, MouseZSpeed

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally