indigo.shared.events
package indigo.shared.events
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.
rights of different types of events.
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 plesant experience.- Companion
- object
final case class Combo(mouseInputs: List[MouseInput], keyInputs: List[Key], gamepadInputs: List[GamepadInput])
- Companion
- object
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.
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.
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
since there is no requirement to maintain the original event as the
resultant event. For example, you could map
FrameTick
toCustomEvents.Update
if it make more sense in your domain model.- Value Params
- modelFilter
-
The filter map for the events going into model update
- viewModelFilter
-
The filter map for the events going into view model update
- Companion
- object
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.
Useful for updating anything in your model that "just happens" on every
frame without any other prompting event. Like gravity.
trait GlobalEvent
A trait that tells Indigo to allow this instance into the event loop for the duration of one frame.
Tags events for input devices like mice and keyboards.
a one time thing that happened since the last frame, while the state
represents the ongoing state of an input.
InputEvent
s work in partnership with InputState
. Events representa 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
mouse now?"
there is also the mouse position on the
InputState
i.e. "Where is themouse now?"
Holds a snapshot of the states of the various input types as they were entering this frame.
- Value Params
- gamepad
-
Current state of the gamepad
- keyboard
-
Current state of the keyboard
- mouse
-
Current state of the mouse
- Companion
- object
Can be emitted to trigger the one time play back of a sound asset.
- Value Params
- assetName
-
Reference to the loaded asset
- volume
-
What volume level to play at
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.
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 Params
- clearColor
-
The clear color set during initialisation
- magnification
-
The magnification set during initialisation
- renderingTechnology
-
WebGL 1.0 or WebGL 2.0
A trait whose presence signals that this event should only be routed to subsystems, not the main game.