mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-12-26 12:06:24 -05:00
0d691dbffa
* Feat(KeyBindingMenu): Adds dynamic box system with scrollbar * Feat(Hotkeys): WIP Adds a lot of things * Feat(KeyBindingMenu): WIP Adds logic to binding * Feat(KeyBindingMenu): Fixes assignment logic * Feat(KeyBindingMenu): Adds buttons logic * Feat(KeyBindingMenu): Fixes sprites positions+add padding to Box * Feat(KeyBindingMenu): Adds label blinking cap * Feat(KeyBindingMenu): Removes commented func * Feat(KeyBindingMenu): Fixes lint errors and refactors a bit * Feat(KeyBindingMenu): Corrects few minor things from Grave * Feat(KeyBindingMenu): removes forgotten key to string mapping
44 lines
1.0 KiB
Go
44 lines
1.0 KiB
Go
package d2interface
|
|
|
|
import (
|
|
"image"
|
|
"image/color"
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
|
)
|
|
|
|
// Animation is an animation
|
|
type Animation interface {
|
|
BindRenderer(Renderer)
|
|
Clone() Animation
|
|
SetSubLoop(startFrame, EndFrame int)
|
|
Advance(elapsed float64) error
|
|
GetCurrentFrameSurface() Surface
|
|
Render(target Surface)
|
|
RenderFromOrigin(target Surface, shadow bool)
|
|
RenderSection(sfc Surface, bound image.Rectangle)
|
|
GetFrameSize(frameIndex int) (int, int, error)
|
|
GetCurrentFrameSize() (int, int)
|
|
GetFrameBounds() (int, int)
|
|
GetCurrentFrame() int
|
|
GetFrameCount() int
|
|
IsOnFirstFrame() bool
|
|
IsOnLastFrame() bool
|
|
GetDirectionCount() int
|
|
SetDirection(directionIndex int) error
|
|
GetDirection() int
|
|
SetCurrentFrame(frameIndex int) error
|
|
Rewind()
|
|
PlayForward()
|
|
PlayBackward()
|
|
Pause()
|
|
SetPlayLoop(loop bool)
|
|
SetPlaySpeed(playSpeed float64)
|
|
SetPlayLength(playLength float64)
|
|
SetColorMod(colorMod color.Color)
|
|
GetPlayedCount() int
|
|
ResetPlayedCount()
|
|
SetEffect(effect d2enum.DrawEffect)
|
|
SetShadow(shadow bool)
|
|
}
|