Made this crazy selection system
This commit is contained in:
12
entity.go
12
entity.go
@@ -69,6 +69,10 @@ type ContainerEntity interface {
|
||||
// index to a bounding rectangle.
|
||||
PlaceChild (index int, bounds image.Rectangle)
|
||||
|
||||
// SelectChild marks a child as selected or unselected, if it is
|
||||
// selectable.
|
||||
SelectChild (index int, selected bool)
|
||||
|
||||
// ChildMinimumSize returns the minimum size of the child at the
|
||||
// specified index.
|
||||
ChildMinimumSize (index int) (width, height int)
|
||||
@@ -94,6 +98,14 @@ type FocusableEntity interface {
|
||||
FocusPrevious ()
|
||||
}
|
||||
|
||||
// SelectableEntity is given to elements that support the Selectable interface.
|
||||
type SelectableEntity interface {
|
||||
Entity
|
||||
|
||||
// Selected returns whether this element is currently selected.
|
||||
Selected () bool
|
||||
}
|
||||
|
||||
// FlexibleEntity is given to elements that support the Flexible interface.
|
||||
type FlexibleEntity interface {
|
||||
Entity
|
||||
|
||||
Reference in New Issue
Block a user