Class: Sprite_Gauge

Sprite_Gauge

new Sprite_Gauge()

The sprite for displaying a status gauge.

Extends

Members

The bitmap for the sprite

blendModenumberinherited

The blend mode to be applied to the sprite

heightnumberinherited

The height of the sprite without the scale

opacitynumberinherited

The opacity of the sprite (0 to 255)

widthnumberinherited

The width of the sprite without the scale

Methods

bitmapHeight()number

Gets the height of the bitmap
Returns:
TypeDescription
numberThe bitmap height

bitmapWidth()number

Gets the width of the bitmap
Returns:
TypeDescription
numberThe bitmap width

createBitmap()

Creates a bitmap for the sprite

currentMaxValue()number

Get the gauge's max value
Returns:
TypeDescription
numberThe max value of the gauge

currentValue()number

Get the gauge's current value
Returns:
TypeDescription
numberThe current value of the gauge
Destroys the sprite
Draws the gauge

drawGaugeRect(x, y, width, height)

Draws the gauge by x/y/width/height
NameTypeDescription
xnumberThe x coordinate of the gauge
ynumberThe y coordinate of the gauge
widthnumberThe width of the gauge
heightnumberThe height of the gauge
Draws the label
Draws the gauge value

flashingColor1()Array

Get the color 1 flash
Returns:
TypeDescription
ArrayAn array representing a blend color

flashingColor2()Array

Get the color 2 flash
Returns:
TypeDescription
ArrayAn array representing a blend color

gaugeBackColor()string

Get the gauge's back color
Returns:
TypeDescription
stringThe color of the back of the gauge

gaugeColor1()string

Get the gauge's color 1
Returns:
TypeDescription
stringThe color 1 of the gauge

gaugeColor2()string

Get the gauge's color 2
Returns:
TypeDescription
stringThe color 2 of the gauge

gaugeHeight()number

Gets the height of the gauge
Returns:
TypeDescription
numberThe gauge height

gaugeRate()number

Gets the gauge rate
Returns:
TypeDescription
numberx - The rate of the gauge (how much is filled)

gaugeX()number

Gets X coordinate of the gauge
Returns:
TypeDescription
numberThe X coordinate of the gauge

getBlendColor()arrayinherited

Gets the blend color for the sprite
Returns:
TypeDescription
arrayThe blend color [r, g, b, a]

getColorTone()arrayinherited

Gets the color tone for the sprite
Returns:
TypeDescription
arrayThe color tone [r, g, b, gray]
Makes the sprite "hidden" (not visible)

initMembers()

Initialize sprite variables
Initializes the sprite
NameTypeDescription
bitmapBitmapThe bitmap of the sprite

isValid()boolean

Check if the gauge is valid
Returns:
TypeDescription
booleanTrue if the gauge is valid

label()string

Get the gauge's label
Returns:
TypeDescription
stringThe label

labelColor()string

Get the gauge label's color
Returns:
TypeDescription
stringThe color of the label

labelFontFace()string

Gets the font face for the label
Returns:
TypeDescription
stringThe font face

labelFontSize()number

Gets the font size for the label
Returns:
TypeDescription
numberThe font size

labelOpacity()number

Gets the opacity of the label
Returns:
TypeDescription
numberThe opacity

labelOutlineColor()string

Get the gauge label outline color
Returns:
TypeDescription
stringThe color of the label outline

labelOutlineWidth()number

Get the gauge label outline width
Returns:
TypeDescription
numberThe width of the label outline

labelY()number

Gets the Y coordinate of the gauge label
Returns:
TypeDescription
numberThe Y coordinate

measureLabelWidth()number

Gets the width of the label
Since:
  • Version 1.1.0
Returns:
TypeDescription
numberThe width
Sets the x and y coordiantes of the sprite
NameTypeDescription
xnumberThe x coordinate of the sprite
ynumberThe y coordinate of the sprite
Redraws the gauge

setBlendColor(color)inherited

Sets the blend color for the sprite
NameTypeDescription
colorarrayThe blend color [r, g, b, a]

setColorTone(tone)inherited

Sets the color tone for the sprite
NameTypeDescription
tonearrayThe color tone [r, g, b, gray]

setFrame(x, y, width, height)inherited

Sets the rectagle of the bitmap that the sprite displays
NameTypeDescription
xnumberThe x coordinate of the frame
ynumberThe y coordinate of the frame
widthnumberThe width of the frame
heightnumberThe height of the frame
Sets the hue rotation value
NameTypeDescription
huenumberThe hue value (-360, 360)

setup(battler, statusType)

Sets the sprite up
NameTypeDescription
battlerGame_BattlerThe battler object to track
statusTypestringThe type of stat to show in the gauge

setupLabelFont()

Sets up the label's font

setupValueFont()

Sets up the value font
Removes the "hidden" state of the sprite, making it visible

smoothness()number

Get the smoothness of the effect
Returns:
TypeDescription
numberThe smoothness of the effect

textHeight()number

Gets the text height
Since:
  • Version 1.3.3
Returns:
TypeDescription
numberThe text height
Updates the sprite for each frame

updateBitmap()

Updates the sprite's bitmap

updateFlashing()

Updates the gauge flash effect

updateGaugeAnimation()

Updates the gauge animation effect

updateTargetValue(value, maxValue)

Updates for the target value of the gauge
NameTypeDescription
valuenumberThe current value of the gauge
maxValuenumberThe max value of the gauge

updateVisibility()inherited

Updates the visibility status of the sprite

valueColor()string

Get the color for the value based on type
Returns:
TypeDescription
stringThe color of the value

valueFontFace()string

Gets the font face for the value
Returns:
TypeDescription
stringThe font face

valueFontSize()number

Gets the font size for the value
Returns:
TypeDescription
numberThe font size

valueOutlineColor()string

Get the color for the value outline
Returns:
TypeDescription
stringThe color of the outline

valueOutlineWidth()number

Get the width of the value outline
Returns:
TypeDescription
numberThe width of the outline