Sprite_Button.d overview
Table of contents
- utils
- SpriteButtonType (type alias)
- Sprite_Button (class)
- setupFrames (method)
- blockWidth (method)
- blockHeight (method)
- loadButtonImage (method)
- buttonData (method)
- update (method)
- checkBitmap (method)
- updateFrame (method)
- updateOpacity (method)
- setColdFrame (method)
- setHotFrame (method)
- setClickHandler (method)
- onClick (method)
- _buttonType (property)
- _clickHandler (property)
- _coldFrame (property)
- _hotFrame (property)
utils
SpriteButtonType (type alias)
Signature
export declare type SpriteButtonType =
| 'cancel'
| 'pageup'
| 'pagedown'
| 'down'
| 'up'
| 'down2'
| 'up2'
| 'ok'
| 'menu'
Sprite_Button (class)
// Sprite_Button // // The sprite for displaying a button.
Signature
export declare class Sprite_Button {
constructor(buttonType: SpriteButtonType)
}
setupFrames (method)
Signature
setupFrames(): void
blockWidth (method)
Signature
blockWidth(): number
blockHeight (method)
Signature
blockHeight(): number
loadButtonImage (method)
Signature
loadButtonImage(): void
buttonData (method)
Signature
buttonData():
| {
x: number
w: number
}
| {
x: number
w: number
}
| {
x: number
w: number
}
| {
x: number
w: number
}
| {
x: number
w: number
}
| {
x: number
w: number
}
| {
x: number
w: number
}
| {
x: number
w: number
}
| {
x: number
w: number
}
update (method)
Signature
update(): void
checkBitmap (method)
Signature
checkBitmap(): void
updateFrame (method)
Signature
updateFrame(): void
updateOpacity (method)
Signature
updateOpacity(): void
setColdFrame (method)
Signature
setColdFrame(x: number, y: number, width: number, height: number): void
setHotFrame (method)
Signature
setHotFrame(x: number, y: number, width: number, height: number): void
setClickHandler (method)
Signature
setClickHandler(method: () => void): void
onClick (method)
Signature
onClick(): void
_buttonType (property)
Signature
_buttonType: SpriteButtonType
_clickHandler (property)
Signature
_clickHandler: (() => void) | null
_coldFrame (property)
Signature
_coldFrame: Rectangle | null
_hotFrame (property)
Signature
_hotFrame: Rectangle | null