reckfellENGINE

InputEventMouse

Common mouse-event base: points and a button mask.

On this page
class InputEventMouseReckfellSharpInherits InputEventWithModifiers

Use a concrete InputEventMouseButton or InputEventMouseMotion. The base type combines Position, GlobalPosition and ButtonMask. These are event data, not a cursor-movement command.

Delivery to Control converts Position into its local space. For example, without additional transforms, a control positioned at (40, 30) receives a click at (50, 40) with local Position = (10, 10), while stored GlobalPosition remains (50, 40). With scaling, canvas transforms or SubViewport, choose the required conversion explicitly instead of substituting GlobalPosition because of its name.

ButtonMask combines held-button bits; the button subclass's ButtonIndex identifies one event. The two enums are not interchangeable.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties3

ButtonMaskProperty
# ButtonMask
C#
public MouseButtonMask ButtonMask { get; set; }

MouseButtonMask bit combination for buttons held together. An empty mask is 0. This is separate data from the event's ButtonIndex; assigning one field does not automatically derive the other.

GlobalPositionProperty
# GlobalPosition
C#
public Vector2 GlobalPosition { get; set; }

Stored common event point. Mouse button and motion XformedBy preserve it while transforming Position. Do not interpret Global as an Entity2D world position or an absolute desktop point: its space depends on delivery through the Viewport and canvas.

PositionProperty
# Position
C#
public Vector2 Position { get; set; }

Point in the event recipient's space. _Input uses Viewport space; delivery to Control.GuiInput uses Control-local coordinates. XformedBy transforms this point including translation. It is neither Relative displacement nor guaranteed OS coordinates.

Methods6

GetButtonMaskMouseButtonMask
# GetButtonMask
C#
public MouseButtonMask GetButtonMask();

Returns ButtonMask from the event without polling the device again.

Returns MouseButtonMask

Current ButtonMask value in the property's space and units.

GetGlobalPositionVector2
# GetGlobalPosition
C#
public Vector2 GetGlobalPosition();

Returns GlobalPosition from the event without polling the device again.

Returns Vector2

Current GlobalPosition value in the property's space and units.

GetPositionVector2
# GetPosition
C#
public Vector2 GetPosition();

Returns Position from the event without polling the device again.

Returns Vector2

Current Position value in the property's space and units.

SetButtonMaskvoid
# SetButtonMask
C#
public void SetButtonMask(MouseButtonMask buttonMask);

Sets ButtonMask using the property rules; neither moves the OS pointer nor submits input.

Parameters
NameTypeDefault
buttonMaskMouseButtonMask—
buttonMask

New ButtonMask value.

SetGlobalPositionvoid
# SetGlobalPosition
C#
public void SetGlobalPosition(Vector2 globalPosition);

Sets GlobalPosition using the property rules; neither moves the OS pointer nor submits input.

Parameters
NameTypeDefault
globalPositionVector2—
globalPosition

New GlobalPosition value.

SetPositionvoid
# SetPosition
C#
public void SetPosition(Vector2 position);

Sets Position using the property rules; neither moves the OS pointer nor submits input.

Parameters
NameTypeDefault
positionVector2—
position

New Position value.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.