Class Component
A component defines something that can be drawn, handle events, and takes up a space on the screen
Constructors
Name | Description |
---|---|
this
|
It may be useful for a component to have access to it's containing display |
Fields
Name | Type | Description |
---|---|---|
container
|
Display | The display that contains this component |
Properties
Name | Type | Description |
---|---|---|
location [get]
|
AxisAlignedBoundingBox!(int,2) | Gets where the component is on the screen |
Methods
Name | Description |
---|---|
draw
|
How the component should draw itself on the screen |
handleEvent
|
Takes in an SDL event and should define what behaviour should happen for specific events |