Class ComponentGroup

A ComponentGroup is just a way of grouping a bunch of related components into one singular group From there, a ComponentGroup functions exactly as any other normal component would Unexpected behaviour may stem if the components in the component group aren't all of the same Display

class ComponentGroup
  : Component ;

Constructors

NameDescription
this Creates a ComponentGroup given the component-required Display as well as what sub components are in the group Unexpected behaviour may stem if the components in the component group aren't all of the same Display

Fields

NameTypeDescription
subComponents Component[]The components that are in this ComponentGroup
container DisplayThe display that contains this component

Properties

NameTypeDescription
location[get] AxisAlignedBoundingBox!(int,2)Gets the location of this group as the smallest rectangle that contains all components

Methods

NameDescription
draw The group handles drawing by just drawing all of the sub components Components are drawn in the order they are in the group; later components go on top of earlier components
handleEvent The group handles events by sending events to the sub components Components recieve events in the same order they are in the group