Class in reactor_sprites.js

Sprite_Button

14 functions in 5 groups · hide internal

The main menu, drawn by Scenes and Windows.

Familiar territory. Sprite_Button keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

Quick Reference

Setup & Creation 3

initialize() Sets up a new instance.
setupFrames() Setup frames.
loadButtonImage() Loads the button image.

Actions 3

setColdFrame() Sets the cold frame.
setHotFrame() Sets the hot frame.
setClickHandler() Sets the click handler.

Events, Commands & Input 1

onClick() Called when click happens.

Updating & Drawing 3

update() Update.
updateFrame() Updates the frame each frame.
updateOpacity() Updates the opacity each frame.

Other 4

blockWidth() Block width.
blockHeight() Block height.
buttonData() Button data.
checkBitmap() Check bitmap.

Setup & Creation

initialize

method source
Sprite_Button.prototype.initialize(buttonType)

Sets up a new instance. (Same as the RPG Maker MZ method of this name.)

setupFrames

method source
Sprite_Button.prototype.setupFrames()

Setup frames. (Same as the RPG Maker MZ method of this name.)

loadButtonImage

method source
Sprite_Button.prototype.loadButtonImage()

Loads the button image. (Same as the RPG Maker MZ method of this name.)

Actions

setColdFrame

method source
Sprite_Button.prototype.setColdFrame(x, y, width, height)

Sets the cold frame. (Same as the RPG Maker MZ method of this name.)

setHotFrame

method source
Sprite_Button.prototype.setHotFrame(x, y, width, height)

Sets the hot frame. (Same as the RPG Maker MZ method of this name.)

setClickHandler

method source
Sprite_Button.prototype.setClickHandler(method)

Sets the click handler. (Same as the RPG Maker MZ method of this name.)

Events, Commands & Input

onClick

method source
Sprite_Button.prototype.onClick()

Called when click happens. (Same as the RPG Maker MZ method of this name.)

Updating & Drawing

update

method source
Sprite_Button.prototype.update()

Update. (Same as the RPG Maker MZ method of this name.)

updateFrame

method source
Sprite_Button.prototype.updateFrame()

Updates the frame each frame. (Same as the RPG Maker MZ method of this name.)

updateOpacity

method source
Sprite_Button.prototype.updateOpacity()

Updates the opacity each frame. (Same as the RPG Maker MZ method of this name.)

Other

blockWidth

method source
Sprite_Button.prototype.blockWidth()

Block width. (Same as the RPG Maker MZ method of this name.)

blockHeight

method source
Sprite_Button.prototype.blockHeight()

Block height. (Same as the RPG Maker MZ method of this name.)

buttonData

method source
Sprite_Button.prototype.buttonData()

Button data. (Same as the RPG Maker MZ method of this name.)

checkBitmap

method source
Sprite_Button.prototype.checkBitmap()

Check bitmap. (Same as the RPG Maker MZ method of this name.)