Link Search Menu Expand Document

Sprite_Button.d overview


Table of contents


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