pimouse

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Position      pi.Position
	MovementDelta pi.Position // mouse movement delta since the last frame
)

Functions

func ButtonDebugTarget

func ButtonDebugTarget() pievent.Target[EventButton]

func ButtonTarget

func ButtonTarget() pievent.Target[EventButton]

func Duration

func Duration(b Button) int

func MoveDebugTarget

func MoveDebugTarget() pievent.Target[EventMove]

func MoveTarget

func MoveTarget() pievent.Target[EventMove]

Types

type Button

type Button string
const (
	Left  Button = "Left"
	Right Button = "Right"
)

type EventButton

type EventButton struct {
	Type   EventButtonType
	Button Button
}

EventButton is published when the player presses or releases a mouse button. It may be published more than once during a single game tick.

type EventButtonType

type EventButtonType string
const (
	EventButtonUp   EventButtonType = "up"
	EventButtonDown EventButtonType = "down"
)

type EventMove

type EventMove struct {
	Position pi.Position
	Previous pi.Position
}

EventMove is published when the mouse is moved.

It may be published more than once during a single game tick.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL