Documentation
¶
Index ¶
- type Switch
- func (c *Switch) Add(k int, v render.Modifiable) (err error)
- func (c *Switch) Copy() render.Modifiable
- func (c *Switch) Draw(buff draw.Image, xOff float64, yOff float64)
- func (c *Switch) Filter(fs ...mod.Filter)
- func (c *Switch) Get() int
- func (c *Switch) GetDims() (int, int)
- func (c *Switch) GetRGBA() *image.RGBA
- func (c *Switch) GetSub(s int) render.Modifiable
- func (c *Switch) IsInterruptable() bool
- func (c *Switch) IsStatic() bool
- func (c *Switch) Modify(ms ...mod.Mod) render.Modifiable
- func (c *Switch) Pause()
- func (c *Switch) Revert(mod int)
- func (c *Switch) RevertAll()
- func (c *Switch) Set(k int) error
- func (c *Switch) SetOffsets(k int, offsets physics.Vector)
- func (c *Switch) SetTriggerID(cid event.CID)
- func (c *Switch) ShiftPos(x, y float64)
- func (c *Switch) Unpause()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Switch ¶
type Switch struct { render.LayeredPoint Index int // contains filtered or unexported fields }
The Switch type will display one of a set of modifiable sub-components, keyed on integers. Consider using it with bitflags.
func New ¶
func New(start int, m map[int]render.Modifiable) *Switch
New creates a new Switch from a map of values to modifiables
func (*Switch) Add ¶
func (c *Switch) Add(k int, v render.Modifiable) (err error)
Add makes a new entry in the Switch's map. If the key already existed, it will be overwritten and an error will be returned.
func (*Switch) GetSub ¶
func (c *Switch) GetSub(s int) render.Modifiable
GetSub returns a keyed Modifiable from this Switch's map
func (*Switch) IsInterruptable ¶
IsInterruptable returns whether the current renderable is interruptable
func (*Switch) Modify ¶
func (c *Switch) Modify(ms ...mod.Mod) render.Modifiable
Modify performs the input modifications on all elements of the Switch
func (*Switch) RevertAll ¶
func (c *Switch) RevertAll()
RevertAll will revert all parts of this Switch that can be reverted, back to their original state.
func (*Switch) SetOffsets ¶
SetOffsets sets the logical offset for the specified key
func (*Switch) SetTriggerID ¶
SetTriggerID sets the ID AnimationEnd will trigger on for animating subtypes. Todo: standardize this with the other interface Set functions so that it also only acts on the current subRenderable, or the other way around, or somehow offer both options