π¦ JEEventCodeGroup
Technical reference for the
JEEventCodeGroupclass of JarEngine.
Inherit from
β’>JEInternBaseClass<β’π
πΉ Overview
JEEventCodeGroup is responsible for grouping multiple event codes into a single event collection.
Provides:
- Storage of multiple
JEEventCodeobjects. - Event group combination through operator overloading.
- Iteration support over stored events.
Represents a collection of event identifiers used by JarEngineβs event management system. It allows multiple events to be handled together, simplifying event comparisons and input handling while keeping compatibility with individual JEEventCode objects.
πΉ Location
JarEngine
β
βββ events
β βββ JEEventCodeGroup
β
βββ ...
πΉ Data
| Field | Type | Description | Property? | Can be set? |
|---|---|---|---|---|
events |
list[JEEventCode] |
Stored event codes contained in the group. | True | False |
πΉ API
| Function | Arguments | Returns | Description |
|---|---|---|---|
__init__ |
events: list[JEEventCode] |
Β | Creates an event group from a list of event codes. |
__or__ |
other: JEEventCode \| JEEventCodeGroup |
JEEventCodeGroup |
Creates a new event group by combining existing event codes with another event or group. |
__iter__ |
Β | Iterator[JEEventCode] |
Returns an iterator over the stored event codes. |
πΉ Usage
from jarengine import Events
quit_event = Events.Event.JEEventCode(1)
resize_event = Events.Event.JEEventCode(2)
event_group = quit_event | resize_event
for event in event_group:
print(int(event))