# Mouse Wheel
Grammar — Player player moves mouse wheel.
Flags —Native
|Event
Only register for this event when you absolutely need it, as it will generate network traffic from all players for every mouse wheel move they make. This event fires when a player moves the mouse wheel. Use “Mouse Wheel Spin” to get the amount the mouse wheel moved.
# Arguments
int
— Player
Returns — void
native void TriggerAddEventMouseWheel(
trigger t,
int player,
);
# Related
Category: UI / Input
- Key Pressed —
void
— TriggerAddEventKeyPressed - Hotkey Pressed —
void
— TriggerAddEventHotkeyPressed - Button Pressed —
void
— TriggerAddEventButtonPressed - Mouse Clicked —
void
— TriggerAddEventMouseClicked - Mouse Moved —
void
— TriggerAddEventMouseMoved - Mouse Wheel —
void
— TriggerAddEventMouseWheel - Button Pressed —
string
<gamelink::Button> — EventButtonPressed - Key Pressed —
int
<preset::Key> — EventKeyPressed - Hotkey Pressed —
int
<preset::Key> — EventHotkeyPressed - Control Key Pressed —
bool
— EventKeyControl - Alt Key Pressed —
bool
— EventKeyAlt - Shift Key Pressed —
bool
— EventKeyShift - Mouse Clicked Button —
int
<preset::MouseButton> — EventMouseClickedButton - Mouse Clicked UI Pos X —
int
— EventMouseClickedPosXUI - Mouse Clicked UI Pos Y —
int
— EventMouseClickedPosYUI - Mouse Clicked World Pos X —
fixed
— EventMouseClickedPosXWorld - Mouse Clicked World Pos Y —
fixed
— EventMouseClickedPosYWorld - Mouse Clicked World Pos Z —
fixed
— EventMouseClickedPosZWorld - Mouse Moved UI Pos X —
int
— EventMouseMovedPosXUI - Mouse Moved UI Pos Y —
int
— EventMouseMovedPosYUI - Mouse Moved World Pos X —
fixed
— EventMouseMovedPosXWorld - Mouse Moved World Pos Y —
fixed
— EventMouseMovedPosYWorld - Mouse Moved World Pos Z —
fixed
— EventMouseMovedPosZWorld - Mouse Wheel Spin —
fixed
— EventMouseWheelSpin
# Examples
mods/frontiers.sc2mod — base.sc2data/Lib6CB3363F.galaxy:1517
void lib6CB3363F_gt_MouseWheelWeaponChange_Init () {
lib6CB3363F_gt_MouseWheelWeaponChange = TriggerCreate("lib6CB3363F_gt_MouseWheelWeaponChange_Func");
TriggerAddEventMouseWheel(lib6CB3363F_gt_MouseWheelWeaponChange, c_playerAny);
}