indigo.shared.events

Members list

Type members

Classlikes

final case class AccessControl(allowAssetEvents: Boolean, allowCustomEvents: Boolean, allowFrameTick: Boolean, allowKeyboardEvents: Boolean, allowMouseEvents: Boolean, allowNetworkEvents: Boolean, allowStorageEvents: Boolean, allowSubSystemEvents: Boolean, allowViewEvents: Boolean)

A simple type containing flags allowing exact control over the access rights of different types of events.

A simple type containing flags allowing exact control over the access rights of different types of events.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object ApplicationGainedFocus extends GlobalEvent

The application has received focus

The application has received focus

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
case object ApplicationLostFocus extends GlobalEvent

The application has lost focus

The application has lost focus

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
sealed trait AssetEvent extends GlobalEvent

Events relating to dynamically loading assets after the game has started.

Events relating to dynamically loading assets after the game has started.

These events are the underlying events used by the AssetBundleLoader SubSystem, which makes loading assets a slightly more pleasant experience.

Attributes

Companion
object
Supertypes
trait GlobalEvent
class Object
trait Matchable
class Any
Known subtypes
object AssetEvent

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
AssetEvent.type
case object CanvasGainedFocus extends GlobalEvent

The game canvas has received focus

The game canvas has received focus

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
case object CanvasLostFocus extends GlobalEvent

The game canvas has lost focus

The game canvas has lost focus

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
final case class Combo(mouseInputs: List[MouseInput], keyInputs: List[Key], gamepadInputs: List[GamepadInput])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Combo

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Combo.type
case object EnterFullScreen extends GlobalEvent

Attempt to enter full screen mode

Attempt to enter full screen mode

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
final case class EventFilters(modelFilter: GlobalEvent => Option[GlobalEvent], viewModelFilter: GlobalEvent => Option[GlobalEvent])

EventFilter's control which events will be processed by your model or view model. You can think of event filters like a firewall for events, that only permit the wanted events into the model and view model update functions to avoid conflicts, duplicate, and needless work.

EventFilter's control which events will be processed by your model or view model. You can think of event filters like a firewall for events, that only permit the wanted events into the model and view model update functions to avoid conflicts, duplicate, and needless work.

Events are filtered by mapping from a specific event to an optional event.

Although the name says "filter", the action is really filter and map, since there is no requirement to maintain the original event as the resultant event. For example, you could map FrameTick to CustomEvents.Update if it make more sense in your domain model.

Value parameters

modelFilter

The filter map for the events going into model update

viewModelFilter

The filter map for the events going into view model update

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object EventFilters

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case object ExitFullScreen extends GlobalEvent

Attempt to exit full screen mode

Attempt to exit full screen mode

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
case object FrameTick extends GlobalEvent

A special event that happens once per frame, at the end of the frame. Useful for updating anything in your model that "just happens" on every frame without any other prompting event. Like gravity.

A special event that happens once per frame, at the end of the frame. Useful for updating anything in your model that "just happens" on every frame without any other prompting event. Like gravity.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
FrameTick.type

A problem occurred trying to enter full screen

A problem occurred trying to enter full screen

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait ViewEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
case object FullScreenEntered extends ViewEvent

The game entered full screen mode

The game entered full screen mode

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait ViewEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type

A problem occurred trying to exit full screen

A problem occurred trying to exit full screen

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait ViewEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
case object FullScreenExited extends ViewEvent

The game exited full screen mode

The game exited full screen mode

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait ViewEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
trait GlobalEvent

A trait that tells Indigo to allow this instance into the event loop for the duration of one frame.

A trait that tells Indigo to allow this instance into the event loop for the duration of one frame.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Allocate
class Find
class NothingFound
class Post
case Load
case Retry
case Started
case Success
case Failure
class Move
enum SceneEvent
case JumpTo
object ApplicationLostFocus.type
trait AssetEvent
class LoadAsset
object CanvasGainedFocus.type
object CanvasLostFocus.type
object EnterFullScreen.type
object ExitFullScreen.type
object FrameTick.type
object FullScreenEnterError.type
object FullScreenExitError.type
class Unspecified
trait InputEvent
class KeyDown
class KeyUp
trait MouseEvent
class Click
class Enter
class Leave
class MouseDown
class MouseUp
class Move
class Wheel
trait PointerEvent
class PointerDown
class PointerEnter
class PointerLeave
class PointerMove
class PointerUp
trait NetworkEvent
object Offline.type
object Online.type
object HttpError.type
class HttpResponse
class Close
class Error
class Receive
trait HttpRequest
class DELETE
class GET
class POST
class PUT
class ConnectOnly
class Open
class Send
class PlaySound
trait StorageEvent
class Delete
object DeleteAll.type
class FetchKeyAt
class FetchKeys
class KeyFoundAt
class KeysFound
class Load
class Loaded
class Save
class KillAll
class Spawn
class Update
object ToggleFullScreen.type
trait ViewEvent
object FullScreenEntered.type
object FullScreenExited.type
Show all
object GlobalEvent

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

A trait that tells Indigo that an error has occurred

A trait that tells Indigo that an error has occurred

Attributes

Supertypes
trait GlobalEvent
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
sealed trait InputEvent extends GlobalEvent, Product, Serializable

Tags events for input devices like mice and keyboards. InputEvents work in partnership with InputState. Events represent a one time thing that happened since the last frame, while the state represents the ongoing state of an input.

Tags events for input devices like mice and keyboards. InputEvents work in partnership with InputState. Events represent a one time thing that happened since the last frame, while the state represents the ongoing state of an input.

For example there is a mouse Move event i.e. "The mouse was moved" and there is also the mouse position on the InputState i.e. "Where is the mouse now?"

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Known subtypes
class KeyDown
class KeyUp
trait MouseEvent
class Click
class Enter
class Leave
class MouseDown
class MouseUp
class Move
class Wheel
trait PointerEvent
class PointerDown
class PointerEnter
class PointerLeave
class PointerMove
class PointerUp
Show all
final case class InputMapping[A](oneOf: List[(Combo, A)])

Input mapping instances describe combinations of "live" inputs like key combinations or gamepad buttons, and map them to some user defined value.

Input mapping instances describe combinations of "live" inputs like key combinations or gamepad buttons, and map them to some user defined value.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object InputMapping

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final class InputState(val mouse: Mouse, val keyboard: Keyboard, val gamepad: Gamepad, val pointers: Pointers)

Holds a snapshot of the states of the various input types as they were entering this frame.

Holds a snapshot of the states of the various input types as they were entering this frame.

Value parameters

gamepad

Current state of the gamepad

keyboard

Current state of the keyboard

mouse

Current state of the mouse

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object InputState

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
InputState.type
sealed trait KeyboardEvent extends InputEvent

Represents all keyboard events

Represents all keyboard events

Attributes

Companion
object
Supertypes
trait InputEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Known subtypes
class KeyDown
class KeyUp
object KeyboardEvent

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Follows the MDN spec values https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button Relies on the ordinal behavior of Scala 3 enums to match the button number

Follows the MDN spec values https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button Relies on the ordinal behavior of Scala 3 enums to match the button number

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MouseButton

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait MouseEvent extends InputEvent, MouseOrPointerEvent

Represents all mouse events

Represents all mouse events

Attributes

Companion
object
Supertypes
trait InputEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Known subtypes
class Click
class Enter
class Leave
class MouseDown
class MouseUp
class Move
class Wheel
Show all
object MouseEvent

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
MouseEvent.type
enum MouseInput

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object MouseInput

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
MouseInput.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait MouseEvent
class Click
class Enter
class Leave
class MouseDown
class MouseUp
class Move
class Wheel
trait PointerEvent
class PointerDown
class PointerEnter
class PointerLeave
class PointerMove
class PointerUp
Show all
enum MouseWheel

Represents in which direction the mouse wheel was rotated

Represents in which direction the mouse wheel was rotated

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait NetworkEvent extends GlobalEvent

A class of events representing general networking events

A class of events representing general networking events

Attributes

Companion
object
Supertypes
trait GlobalEvent
class Object
trait Matchable
class Any
Known subtypes
object Offline.type
object Online.type
object NetworkEvent

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

A class of events representing inbound communication over a network protocol

A class of events representing inbound communication over a network protocol

Attributes

Supertypes
trait GlobalEvent
class Object
trait Matchable
class Any
Known subtypes
object HttpError.type
class HttpResponse
class Close
class Error
class Receive
Show all

A class of events representing outbound communication over a network protocol

A class of events representing outbound communication over a network protocol

Attributes

Supertypes
trait GlobalEvent
class Object
trait Matchable
class Any
Known subtypes
trait HttpRequest
class DELETE
class GET
class POST
class PUT
class ConnectOnly
class Open
class Send
Show all
final case class PlaySound(assetName: AssetName, volume: Volume) extends GlobalEvent

Can be emitted to trigger the one time play back of a sound asset.

Can be emitted to trigger the one time play back of a sound asset.

Value parameters

assetName

Reference to the loaded asset

volume

What volume level to play at

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all

Represents all mouse, pen and touch events

Represents all mouse, pen and touch events

Attributes

Companion
object
Supertypes
trait InputEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Known subtypes
class PointerDown
class PointerEnter
class PointerLeave
class PointerMove
class PointerUp
Show all
opaque object PointerEvent

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class RendererDetails(renderingTechnology: RenderingTechnology, clearColor: RGBA, magnification: Int) extends ViewEvent

Event to inform the game which rendering choices are active. For example a view may wish to behave differently depending on the rendering technology available. This event is only fired once during start up.

Event to inform the game which rendering choices are active. For example a view may wish to behave differently depending on the rendering technology available. This event is only fired once during start up.

Value parameters

clearColor

The clear color set during initialisation

magnification

The magnification set during initialisation

renderingTechnology

WebGL 1.0 or WebGL 2.0

Attributes

Supertypes
trait ViewEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all

Events relating to manipulating locally stored data

Events relating to manipulating locally stored data

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait StorageEvent extends GlobalEvent

Attributes

Companion
object
Supertypes
trait GlobalEvent
class Object
trait Matchable
class Any
Known subtypes
class Delete
object DeleteAll.type
class FetchKeyAt
class FetchKeys
class KeyFoundAt
class KeysFound
class Load
class Loaded
class Save
Show all
object StorageEvent

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait StorageEventError extends GlobalEventError

Attributes

Companion
object
Supertypes
trait GlobalEvent
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
enum StorageKey

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait SubSystemEvent extends GlobalEvent

A trait whose presence signals that this event should only be routed to subsystems, not the main game.

A trait whose presence signals that this event should only be routed to subsystems, not the main game.

Attributes

Supertypes
trait GlobalEvent
class Object
trait Matchable
class Any
Known subtypes
case Load
case Retry
class KillAll
class Spawn
class Update
Show all
case object ToggleFullScreen extends GlobalEvent

Attempt to enter or exit full screen mode

Attempt to enter or exit full screen mode

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Self type
sealed trait ViewEvent extends GlobalEvent, Product, Serializable

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all
Known subtypes
object FullScreenEnterError.type
object FullScreenEntered.type
object FullScreenExitError.type
object FullScreenExited.type
Show all
final case class ViewportResize(gameViewPort: GameViewport) extends ViewEvent

Fired whenever the game window changes size, so that the view can respond.

Fired whenever the game window changes size, so that the view can respond.

Value parameters

gameViewPort

The actual size in pixels, you can ask it to apply magnification.

Attributes

Supertypes
trait ViewEvent
trait Serializable
trait Product
trait Equals
trait GlobalEvent
class Object
trait Matchable
class Any
Show all