Documentation ¶
Index ¶
- Constants
- Variables
- func NewImage(path string) *ebiten.Image
- func NewImageImage(path string) image.Image
- func NewScaledImage(i *ebiten.Image, scale float64) *ebiten.Image
- func NewXFlippedImage(i *ebiten.Image) *ebiten.Image
- func NewYFlippedImage(i *ebiten.Image) *ebiten.Image
- type Align
- type Animation
- type Box
- func (b *Box) ApplyScale(scale float64)
- func (b Box) In(size, p Point) bool
- func (b Box) Max(size Point) Point
- func (b Box) Min(size Point) (min Point)
- func (b *Box) Move(x, y float64)
- func (b *Box) SetPoint(x, y float64, origin Origin)
- func (b *Box) SetScale(scale Point)
- func (b Box) XY(size Point) (float64, float64)
- type Button
- type ButtonMode
- type Label
- type Origin
- type Point
- type Sprite
- func (s Sprite) Draw(screen *ebiten.Image, op ebiten.DrawImageOptions)
- func (s Sprite) H() float64
- func (s Sprite) In(p Point) bool
- func (s Sprite) IsValid() bool
- func (s *Sprite) SetScaleToH(h float64)
- func (s *Sprite) SetScaleToW(w float64)
- func (s *Sprite) SetSize(w, h float64)
- func (s Sprite) Size() Point
- func (s Sprite) SrcSize() Point
- func (s Sprite) W() float64
- func (s Sprite) XY() (float64, float64)
- type Subject
- type Timer
- type Timer2
Constants ¶
View Source
const ( ButtonModePressed = iota ButtonModeClicked // onClick goes called when mouse button is pressed and released. )
View Source
const ( Left = iota Center Right )
View Source
const ( Top = iota Middle Bottom )
Variables ¶
View Source
var ( LeftTop = struct{ X, Y int }{Left, Top} LeftMiddle = struct{ X, Y int }{Left, Middle} LeftBottom = struct{ X, Y int }{Left, Bottom} CenterTop = struct{ X, Y int }{Center, Top} CenterMiddle = struct{ X, Y int }{Center, Middle} CenterBottom = struct{ X, Y int }{Center, Bottom} RightTop = struct{ X, Y int }{Right, Top} RightMiddle = struct{ X, Y int }{Right, Middle} RightBottom = struct{ X, Y int }{Right, Bottom} )
Functions ¶
func NewImage ¶
func NewImage(path string) *ebiten.Image
NewImage returns nil when fails to load image from the path.
func NewScaledImage ¶
func NewScaledImage(i *ebiten.Image, scale float64) *ebiten.Image
func NewXFlippedImage ¶
func NewXFlippedImage(i *ebiten.Image) *ebiten.Image
func NewYFlippedImage ¶
func NewYFlippedImage(i *ebiten.Image) *ebiten.Image
Types ¶
type Box ¶
func (*Box) ApplyScale ¶
type Button ¶
type Button struct {
// contains filtered or unexported fields
}
func NewButton ¶
func NewButton(s Subject, onClick func(), mode ButtonMode) Button
type ButtonMode ¶
type ButtonMode int
type Sprite ¶
type Sprite struct { Box // contains filtered or unexported fields }
func NewSpriteFromImage ¶
func NewSpriteFromImage(i *ebiten.Image) Sprite
func (*Sprite) SetScaleToH ¶
func (*Sprite) SetScaleToW ¶
type Timer2 ¶
MaxTick, Period == {+, +}: finite drawing with animation. e.g., Judgment. MaxTick, Period == {+, 0}: finite drawing with no animation. e.g., Combo. MaxTick, Period == {0, +}: infinite drawing with animation. e.g., Dancer. MaxTick, Period == {0, 0}: infinite drawing with no animation. e.g., Stage.
Click to show internal directories.
Click to hide internal directories.