Class: Window_Scrollable

Window_Scrollable

new Window_Scrollable()

The window class with scroll functions.

Extends

Members

activebooleaninherited

The active state for the window

backOpacitynumberinherited

The opacity of the window background (0 to 255)
The bitmap used for the window contents

contentsBackBitmapinherited

The bitmap used for the window contents background

contentsOpacitynumberinherited

The opacity of the window contents (0 to 255)

cursorVisiblebooleaninheritedoverrides

The visibility of the cursor

downArrowVisiblebooleaninheritedoverrides

The visibility of the down scroll arrow

frameVisiblebooleaninherited

The visibility of the frame

heightnumberinherited

The height of the window in pixels

innerHeightnumberreadonlyinherited

The height of the content area in pixels

innerRectRectanglereadonlyinherited

The rectangle of the content area

innerWidthnumberreadonlyinherited

The width of the content area in pixels

marginnumberinherited

The size of the margin for the window background

opacitynumberinherited

The opacity of the window without contents (0 to 255)

opennessnumberinherited

The openness of the window (0 to 255)
The origin point of the window for scrolling

paddingnumberinherited

The size of the padding between the frame and contents

pausebooleaninherited

The visibility of the pause sign

upArrowVisiblebooleaninheritedoverrides

The visibility of the up scroll arrow

widthnumberinherited

The width of the window in pixels

windowskinBitmapinherited

The image used as a window skin

Methods

Activates the window

actorName(n)stringinherited

Gets an actor name from their id
NameTypeDescription
nnumberActor id
Returns:
TypeDescription
stringThe actor's name

addChildToBack(child)objectinherited

Adds a child between the background and contents
NameTypeDescription
childobjectThe child to add
Returns:
TypeDescription
objectThe child that was added

addInnerChild(child)objectinherited

Adds a child to the client area
NameTypeDescription
childobjectThe child to add
Returns:
TypeDescription
objectThe child that was added
Creates a rectangle for an item of text
Returns:
TypeDescription
RectangleRectangle that encompasses the text item

calcTextHeight(textState)stringinherited

Calculates the height of the text in a text state
NameTypeDescription
textStateObjectThe text state object
Returns:
TypeDescription
stringThe height of the text

changeOutlineColor(color)inherited

Changes the text outline color of text drawn to the window
NameTypeDescription
colorstringThe new outline color to use

changePaintOpacity(enabled)inherited

Changes the opacity of what is painted to the contents of the window
NameTypeDescription
enabledbooleanTrue = use full opacity | False = use translucent opacity

changeTextColor(color)inherited

Changes the text color of text drawn to the window
NameTypeDescription
colorstringThe new color to draw text in

checkRectObject(rect)booleaninherited

Checks if the given rect parameter is a valid Rectangle
NameTypeDescription
rect*The object to check for validity
Throws:
Error if the object is not a valid rectangle
Returns:
TypeDescription
booleanTrue if the object is a valid rectangle

clearScrollStatus()

Clears scrolling status to defaults
Start closing the window

contentsHeight()numberinherited

Gets the height needed for the window contents
Returns:
TypeDescription
numberHeight needed for the window contents

contentsWidth()numberinherited

Gets the width needed for the window contents
Returns:
TypeDescription
numberWidth needed for the window contents

convertEscapeCharacters(text)stringinherited

Converts escape code characters in text, for example \v[x]
NameTypeDescription
textstringThe text to convert
Returns:
TypeDescription
stringText with escape characters converted
Creates the contents of the window

createDimmerSprite()inherited

Creates the background dimmer sprite

createTextBuffer(rtl)stringinherited

Creates a text buffer
NameTypeDescription
rtlbooleanIf the text is right to left (such as arabic text)
Returns:
TypeDescription
stringThe buffer for text embedding either right to left or left to right

createTextState(text, x, y, width)Objectinherited

Creates a text state object for drawing text with text codes
NameTypeDescription
textstringThe text to draw
xnumberThe x coordinate to draw the text
ynumberThe y coordinate to draw the text
widthnumberThe width of the text
Returns:
TypeDescription
ObjectThe text state object
Deactivates the window
Destroys the window
Destroys the contents of the window

drawCharacter(characterName, characterIndex, x, y)inherited

Draws a character at x/y coordinates
NameTypeDescription
characterNamestringThe name of the character sheet bitmap
characterIndexnumberThe index of the character on the sheet
xnumberThe x coordinate
ynumberThe y coordinate

drawCurrencyValue(value, unit, x, y, width)inherited

Draws a currency value
NameTypeDescription
valuenumberThe amount of currency
unitstringThe currency unit
xnumberThe x coordinate
ynumberThe y coordinate
widthnumberThe width available to draw the item name

drawFace(faceName, faceIndex, x, y, width, height)inherited

Draws a face at x/y coordinates with width/height
NameTypeDescription
faceNamestringThe name of the face sheet bitmap
faceIndexnumberThe index of the face on the sheet
xnumberThe x coordinate
ynumberThe y coordinate
widthnumberThe width of the face
heightnumberThe height of the face

drawIcon(iconIndex, x, y)inherited

Draws an icon at x/y coordinates
NameTypeDescription
iconIndexnumberThe index of the icon to draw
xnumberThe x coordinate
ynumberThe y coordinate

drawItemName(item, x, y, width)inherited

Draws an item's name with its icon
NameTypeDescription
itemObjectThe item object to draw, must at least have iconIndex and name properties
xnumberThe x coordinate
ynumberThe y coordinate
widthnumberThe width available to draw the item name

drawRect(x, y, width, height)inherited

Draws a rectangle of given width/height at given x/y coordinates
NameTypeDescription
xnumberThe X coordinate of the upper left corner of the rectangle
ynumberThe Y coordinate of the upper left corner of the rectangle
widthnumberThe width in pixels of the rectangle
heightnumberThe height in pixels of the rectangle
Draws the window shape into PIXI.Graphics object. Used by WindowLayer

drawText(text, x, y, maxWidth, align)inherited

Draws text to the window's contents. Does not support text codes in the text, but will fit the text within the maximum width without overflowing.
NameTypeDescription
textstringThe text to draw
xnumberThe x coordinate to begin drawing the text
ynumberThe y coordinate to begin drawing the text
maxWidthnumberThe maximum width in pixels of the text
alignstringThe alignment of the text

drawTextEx(text, x, y, width)numberinherited

Draws text to the window's contents. Does support text codes.
NameTypeDescription
textstringThe text to draw
xnumberThe x coordinate to draw the text
ynumberThe y coordinate to draw the text
widthnumberThe width of the text
Returns:
TypeDescription
numberThe width of the drawn text

fittingHeight(numLines)numberinherited

Calculates the height needed for a given number of lines
NameTypeDescription
numLinesnumberThe number of lines to calculate the height of
Returns:
TypeDescription
numberThe height needed to fit the amount of lines

flushTextState(textState)inherited

Flushes the text state
NameTypeDescription
textStateObjectThe text state to flush
Stops displaying the window

hideBackgroundDimmer()inherited

Hides the background dimmer sprite
Initializes the window

isClosed()booleaninherited

Checks whether the window is completely closed (openness == 0)
Returns:
TypeDescription
booleanTrue if the window is closed

isClosing()booleaninherited

Check if the window is closing
Returns:
TypeDescription
booleanTrue if window is currently closing

isOpen()booleaninherited

Checks whether the window is completely open (openness == 255)
Returns:
TypeDescription
booleanTrue if the window is open

isOpening()booleaninherited

Check if the window is opening
Returns:
TypeDescription
booleanTrue if window is currently opening

isScrollEnabled()boolean

Check if scrolling is enabled
Returns:
TypeDescription
booleanTrue if the player can scroll the window

isTouchScrollEnabled()boolean

Check if touch scrolling is enabled
Returns:
TypeDescription
booleanTrue if the player can scroll the window using the touch controls

isTouchedInsideFrame()boolean

Check if the last touch input was inside the window
Returns:
TypeDescription
booleanTrue if touched inside the window

isWheelScrollEnabled()boolean

Check if wheel scrolling is enabled
Returns:
TypeDescription
booleanTrue if the player can scroll the window using the mouse wheel

itemHeight()numberinherited

Gets the height in pixels of an item
Returns:
TypeDescription
numberHeight of an item

itemPadding()numberinherited

Gets the padding for an item
Returns:
TypeDescription
numberAmount of item padding
Gets the width in pixels of an item
Returns:
TypeDescription
numberWidth of an item

lineHeight()numberinherited

Gets the height in pixels of one line
Returns:
TypeDescription
numberHeight of a line
Loads the windowskin for the window
Makes the font size bigger by 12
Makes the font size smaller by 12

maxFontSizeInLine(line)numberinherited

Gets the max font size in a line of text
NameTypeDescription
linestringThe line of text
Returns:
TypeDescription
numberThe largest font size seen in the line of text

maxScrollX()number

Get the maximum scroll x position
Returns:
TypeDescription
numberThe maximum scroll x position

maxScrollY()number

Get the maximum scroll y position
Returns:
TypeDescription
numberThe maximum scroll y position

move(x, y, width, height)inherited

Sets the x, y, width, and height of the window
NameTypeDescription
xnumberThe new x coordinate of the window
ynumberThe new y coordinate of the window
widthnumberThe new width of the window
heightnumberThe new height of the window

moveCursorBy(x, y)inherited

Moves the cursor position by the given amount
NameTypeDescription
xnumberThe amount of horizontal movement
ynumberThe amount of vertical movement

moveInnerChildrenBy(x, y)inherited

Moves the inner children by the given amount
NameTypeDescription
xnumberThe amount of horizontal movement
ynumberThe amount of vertical movement

obtainEscapeCode(textState)stringinherited

Gets an escape code
NameTypeDescription
textStateObjectThe text state object
Returns:
TypeDescription
stringThe escape code, will be empty string if none

obtainEscapeParam(textState)int | stringinherited

Gets an escape param
NameTypeDescription
textStateObjectThe text state object
Returns:
TypeDescription
int|stringThe escape param, will be empty string if none
Handling for when touch scrolling starts

onTouchScrollEnd()

Handling for when touch scrolling ends

onTouchScrollStart()

Handling for when scrolling starts
Start opening the window

overallHeight()number

Get the overall height of the window
Returns:
TypeDescription
numberThe overall height of the window

overallWidth()number

Get the overall width of the window
Returns:
TypeDescription
numberThe overall width of the window
Paints window contents. Meant to be overridden - does nothing by default.

partyMemberName(n)stringinherited

Gets an actor name from their position in the party
NameTypeDescription
nnumberPosition in the party
Returns:
TypeDescription
stringThe actor's name
Plays the buzzer sound effect
Plays the cursor sound effect
Plays the ok sound effect

processAllText(textState)inherited

Processes all text within a text state object
NameTypeDescription
textStateObjectThe text state to process

processCharacter(textState)inherited

Processes a character in a text state at the current index of the text state
NameTypeDescription
textStateObjectThe text state object for processing a character

processColorChange(colorIndex)inherited

Processes a color change
NameTypeDescription
colorIndexnumberThe index of the color to change to

processControlCharacter(textState, c)inherited

Processes a control character within a text state
NameTypeDescription
textStateObjectThe text state object with the character
cstringThe character to process

processDrawIcon(iconIndex, textState)inherited

Processes drawing an icon
NameTypeDescription
iconIndexnumberThe index of the icon to draw
textStateObjectThe text state object

processEscapeCharacter(code, textState)inherited

Processes an escape character in a text state
NameTypeDescription
codestringThe escape character's code
textStateObjectThe text state object

processNewLine(textState)inherited

Processing for a new line
NameTypeDescription
textStateObjectThe text state object

processTouchScroll()

Processing for scrolling by touch

processWheelScroll()

Processing for scrolling by mouse wheel

refreshDimmerBitmap()inherited

Refreshes the background dimmer sprite

resetFontSettings()inherited

Resets font settings to defaults
Resets text and outline color to defaults

scrollBaseX()number

Get the base scroll X position
Returns:
TypeDescription
numberThe base scroll X position

scrollBaseY()number

Get the base scroll Y position
Returns:
TypeDescription
numberThe base scroll Y position

scrollBlockHeight()number

Get the height of one block for scrolling
Returns:
TypeDescription
numberThe height of a scroll block

scrollBlockWidth()number

Get the width of one block for scrolling
Returns:
TypeDescription
numberThe width of a scroll block
Add to the x and y scroll position
NameTypeDescription
xnumberThe amount to add to the scroll x position
ynumberThe amount to add to the scroll y position
Scroll to a set position
NameTypeDescription
xnumberThe x position to scroll to
ynumberThe y position to scroll to
Get the current scroll X position
Returns:
TypeDescription
numberThe x position of the scroll
Get the current scroll Y position
Returns:
TypeDescription
numberThe y position of the scroll

setBackgroundType(type)inherited

Sets the background type of the window
NameTypeDescription
typenumberThe type of background (0 = normal, 1 = dim, 2 = transparent)

setCursorRect(x, y, width, height)inherited

Sets the position of the command cursor
NameTypeDescription
xnumberThe x coordinate of the cursor
ynumberThe y coordinate of the cursor
widthnumberThe width of the cursor
heightnumberThe height of the cursor

setScrollAccel(x, y)

Sets the x and y scroll acceleration
NameTypeDescription
xnumberThe x scroll acceleration
ynumberThe y scroll acceleration

setTone(r, g, b)inherited

Changes the color of the background
NameTypeDescription
rnumberThe red value in the range (-255, 255)
gnumberThe green value in the range (-255, 255)
bnumberThe blue value in the range (-255, 255)
Displays the window

showBackgroundDimmer()inherited

Shows the background dimmer sprite

smoothScrollBy(x, y)

Add to the x and y scroll position over an amount of time
NameTypeDescription
xnumberThe amount to add to the scroll x position
ynumberThe amount to add to the scroll y position

smoothScrollDown(n)

Smoothly scroll down
NameTypeDescription
nnumberThe amount of items to scroll down

smoothScrollTo(x, y)

Scroll to a set position over an amount of time
NameTypeDescription
xnumberThe x position to scroll to
ynumberThe y position to scroll to

smoothScrollUp(n)

Smoothly scroll up
NameTypeDescription
nnumberThe amount of items to scroll up

systemColor()stringinherited

Gets the system text color
Returns:
TypeDescription
stringThe system text color

textSizeEx(text)Objectinherited

Calculates the width needed for a given string of text. Does support text codes.
NameTypeDescription
textstringThe text to calculate the width for
Returns:
TypeDescription
ObjectThe width and height of the text

textWidth(text)numberinherited

Calculates the width needed for a given string of text. Does not support text codes.
NameTypeDescription
textstringThe text to calculate the width for
Returns:
TypeDescription
numberThe width of the text

translucentOpacity()numberinherited

Gets the opacity to use for a translucent effect
Returns:
TypeDescription
numberThe opacity to use for a translucent effect
Updates the window for each frame
Updates the arrow up/down visibility

updateBackOpacity()inherited

Updates the window's background opacity

updateBackgroundDimmer()inherited

Updates the background dimmer sprite
Updates the closing effect
Updates the opening effect
Updates the window origin
Updates the window's padding

updateScrollAccel()

Updates the scroll acceleration

updateScrollBase(baseX, baseY)

Updates the scroll base
NameTypeDescription
baseXnumberThe new base x of the scroll
baseYnumberThe new base y of the scroll

updateSmoothScroll()

Updates smooth scrolling
Updates the window's tone

updateTransform()inherited

Updates the transform on all children of this container for rendering