clips

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clip

type Clip struct {
	// contains filtered or unexported fields
}

Clip is a set of frames

func New

func New(sprite *sprites.Sprite, name string, x, y, scale int) *Clip

New creates a new sprite based clip

func NewScaled

func NewScaled(sprite *sprites.Sprite, name string, x, y, width, height, scale int) *Clip

NewScaled creates a new 9 slice scaled sprite based clip

func (*Clip) GetContainer

func (c *Clip) GetContainer() *fyne.Container

GetContainer gets the container from the clip

func (*Clip) GetName

func (c *Clip) GetName() string

GetName gets the name of the clip

func (*Clip) GetPosition

func (c *Clip) GetPosition() fyne.Position

GetPosition gets the position of the clip

func (*Clip) GetSize

func (c *Clip) GetSize() fyne.Size

GetSize gets the size of the clip

func (*Clip) GotoFrame

func (c *Clip) GotoFrame(frame int, refresh bool)

GotoFrame goes to a frame of the clip

func (*Clip) MouseDown

func (c *Clip) MouseDown(ev *desktop.MouseEvent)

MouseDown handles the mouse down event

func (*Clip) MouseIn

func (c *Clip) MouseIn(ev *desktop.MouseEvent)

MouseUp handles the mouse up event

func (*Clip) MouseMoved

func (c *Clip) MouseMoved(ev *desktop.MouseEvent)

MouseMoved handles the mouse moved event

func (*Clip) MouseOut

func (c *Clip) MouseOut()

MouseOut handles the mouse out event

func (*Clip) MouseUp

func (c *Clip) MouseUp(ev *desktop.MouseEvent)

MouseUp handles the mouse up event

func (*Clip) OnEnter

func (c *Clip) OnEnter(handler func(left, right, middle, alt, control bool))

OnEnter sets the enter handler

func (*Clip) OnLeave

func (c *Clip) OnLeave(handler func())

OnLeave sets the leave handler

func (*Clip) OnOver

func (c *Clip) OnOver(handler func(left, right, middle, alt, control bool))

OnOver sets the mouse moved handler

func (*Clip) OnPress

func (c *Clip) OnPress(handler func(left, right, middle, alt, control bool))

OnPress sets the mouse down handler

func (*Clip) OnRelease

func (c *Clip) OnRelease(handler func(left, right, middle, alt, control bool))

OnRelease sets the mouse up handler

type ClipJSON

type ClipJSON struct {
	Name          string
	Sprite        string
	Repeat        string
	X, Y          string
	Width, Height string
}

ClipJSON is a clip in JSON

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL