Class in reactor_sprites.js
Sprite_Button
14 public functions in 5 groups · show internal (_) functions
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 sourceSprite_Button.prototype.initialize(buttonType)
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
setupFrames
method sourceSprite_Button.prototype.setupFrames()
Setup frames. (Same as the RPG Maker MZ method of this name.)
loadButtonImage
method sourceSprite_Button.prototype.loadButtonImage()
Loads the button image. (Same as the RPG Maker MZ method of this name.)
Actions
setColdFrame
method sourceSprite_Button.prototype.setColdFrame(x, y, width, height)
Sets the cold frame. (Same as the RPG Maker MZ method of this name.)
setHotFrame
method sourceSprite_Button.prototype.setHotFrame(x, y, width, height)
Sets the hot frame. (Same as the RPG Maker MZ method of this name.)
setClickHandler
method sourceSprite_Button.prototype.setClickHandler(method)
Sets the click handler. (Same as the RPG Maker MZ method of this name.)
Events, Commands & Input
onClick
method sourceSprite_Button.prototype.onClick()
Called when click happens. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
update
method sourceSprite_Button.prototype.update()
Update. (Same as the RPG Maker MZ method of this name.)
updateFrame
method sourceSprite_Button.prototype.updateFrame()
Updates the frame each frame. (Same as the RPG Maker MZ method of this name.)
updateOpacity
method sourceSprite_Button.prototype.updateOpacity()
Updates the opacity each frame. (Same as the RPG Maker MZ method of this name.)
Other
blockWidth
method sourceSprite_Button.prototype.blockWidth()
Block width. (Same as the RPG Maker MZ method of this name.)
blockHeight
method sourceSprite_Button.prototype.blockHeight()
Block height. (Same as the RPG Maker MZ method of this name.)
buttonData
method sourceSprite_Button.prototype.buttonData()
Button data. (Same as the RPG Maker MZ method of this name.)
checkBitmap
method sourceSprite_Button.prototype.checkBitmap()
Check bitmap. (Same as the RPG Maker MZ method of this name.)