Class: Window_Selectable

(abstract) Window_Selectable(x, y, width, height)

(abstract) new Window_Selectable(x, y, width, height)

Parameters:
Name Type Description
x Number
y Number
width Number
height Number

Extends

Methods

activate()

Overrides:

actorName(actorIndex) → {String}

Returns the actor name given an index; the index starts from 1.
Parameters:
Name Type Description
actorIndex Number
Inherited From:
Returns:
Type
String

addChild(child) → {Object}

[super] Adds a child to the container.
Parameters:
Name Type Description
child Object The child to add
Inherited From:
Returns:
The child that was added
Type
Object

addChildAt(child, index) → {Object}

[super] Adds a child to the container at a specified index.
Parameters:
Name Type Description
child Object The child to add
index Number The index to place the child in
Inherited From:
Returns:
The child that was added
Type
Object

addChildToBack(child) → {Object}

Adds a child between the background and contents.
Parameters:
Name Type Description
child Object The child to add
Inherited From:
Returns:
The child that was added
Type
Object

bottomRow() → {Number}

Returns:
Type
Number

calcTextHeight(textState, all) → {Number}

Calculates the text height of the textState (when using drawTextEx); if all is set to true, all lines of text are calculated, otherwise only a single line is processed.
Parameters:
Name Type Description
textState MV.TextState
all Boolean
Inherited From:
Returns:
Type
Number

callCancelHandler()

callHandler(symbol)

Parameters:
Name Type Description
symbol String

callOkHandler()

Calls the ok handler and begins processing confirmation of selection.

callUpdateHelp()

canvasToLocalX(x) → {Number}

Returns the x coordinate of the mouse to a local window x coordinate.
Parameters:
Name Type Description
x Number
Inherited From:
Returns:
Type
Number

canvasToLocalY(y) → {Number}

Returns the y coordinate of the mouse to a local window y coordinate.
Parameters:
Name Type Description
y Number
Inherited From:
Returns:
Type
Number

changePaintOpacity(enabled)

Changes the paintOpacity (the opacity of the text drawn to the window); if true the opacity is set to 255, otherwise the opacity is set to 160.
Parameters:
Name Type Description
enabled Boolean
Inherited From:

changeTextColor(color)

Changes the text color property given a css color string.
Parameters:
Name Type Description
color String
Inherited From:

clearItem(index)

Parameters:
Name Type Description
index Number

close()

Closes the window.
Inherited From:

contentsHeight() → {Number}

Returns the inner content height of the window.
Inherited From:
Returns:
Type
Number

contentsWidth() → {Number}

Returns the inner content width of the window.
Inherited From:
Returns:
Type
Number

convertEscapeCharacters(text) → {String}

Converts the escape characters and returns the text content after processing the characters.
Parameters:
Name Type Description
text String
Inherited From:
Returns:
Type
String

createContents()

Creates the contents of the window; this is the area of the window which text is drawn to.
Inherited From:

crisisColor() → {String}

Returns the crisis color as a css color string.
Inherited From:
Returns:
Type
String

cursorAll() → {Boolean}

Returns:
Type
Boolean

cursorDown(wrap)

Moves the cursor down; if wrap is passed as true, then it will return to the top when at the end of the list.
Parameters:
Name Type Description
wrap Boolean

cursorFixed() → {Boolean}

Returns true if the _cursorFixed property is true; this means the cursor is locked to a position.
Returns:
Type
Boolean

cursorLeft(wrap)

Parameters:
Name Type Description
wrap Boolean

cursorPagedown()

cursorPageup()

cursorRight(wrap)

Parameters:
Name Type Description
wrap Boolean

cursorUp(wrap)

Moves the cursor up; if wrap is passed as true, then it will return to the bottom when at the top of the list.
Parameters:
Name Type Description
wrap Boolean

deactivate()

Overrides:

deathColor() → {String}

Returns the death color as a css color string.
Inherited From:
Returns:
Type
String

deselect()

Deselects the currently selected index.

dimColor1() → {String}

Color 1 of the dimmer sprite bitmap. for the gradient.
Inherited From:
Returns:
Type
String

dimColor2() → {String}

Color 2 of the dimmer sprite bitmap for the gradient.
Inherited From:
Returns:
Type
String

drawActorCharacter(actor, x, y)

Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
Inherited From:

drawActorClass(actor, x, y, width)

Draws the actor class at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
Inherited From:

drawActorFace(actor, x, y, width, height)

Draws the actor face at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
height Number
Inherited From:

drawActorHp(actor, x, y, width)

Draws the actor hp at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
Inherited From:

drawActorIcons(actor, x, y, width)

Draws the actor icons at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
Inherited From:

drawActorLevel(actor, x, y)

Draws the actor level at the specified x and y coordinates.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
Inherited From:

drawActorMp(actor, x, y, width)

Draws the actor mp at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
Inherited From:

drawActorName(actor, x, y, width)

Draws the actor name at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
Inherited From:

drawActorNickname(actor, x, y, width)

Draws the actor nickname at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
Inherited From:

drawActorSimpleStatus(actor, x, y, width)

Draws a simple status for the game actor passed into the method at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
Inherited From:

drawActorTp(actor, x, y, width)

Draws the actor tp at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
actor Game_Actor
x Number
y Number
width Number
Inherited From:

drawAllItems()

Draws all items within the window; this method cals drawItem multiple times.

drawCharacter(characterName, characterIndex, x, y)

Draws a character (map sprites) at the specified x and y coordinate. CharacterName refers to character spritesheet, and characterIndex refers to the characterIndex on the spritesheet.
Parameters:
Name Type Description
characterName String
characterIndex Number
x Number
y Number
Inherited From:

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

Draws the currency value given at the specified x and y coordinates within the width given. Useful if you want to write your own custom currency value.
Parameters:
Name Type Description
value Number
unit String
x Number
y Number
width Number
Inherited From:

drawCurrentAndMax(current, max, x, y, width, color1, color2)

Draws the current and max number at the specified x and y coordinate within the given width. Color1 represents the current number and color2 represents the max number when the text is drawn.
Parameters:
Name Type Description
current Number
max Number
x Number
y Number
width Number
color1 String
color2 String
Inherited From:

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

Parameters:
Name Type Description
faceName String
faceIndex Number
x Number
y Number
width Number
height Number
Inherited From:

drawGauge(x, y, width, rate, color1, color2)

Draws a gauge at the specified x and y coordinates within the given width. Color1 and Color2 represent the gradient as css color strings of the gauge.
Parameters:
Name Type Description
x Number
y Number
width Number
rate Number
color1 String
color2 String
Inherited From:

drawIcon(iconIndex, x, y)

Draws an icon given the specified iconIndex at the specified x and y coordinates. The Width and Height of the icon is based on the _iconWidth and _iconHeight properties.
Parameters:
Name Type Description
iconIndex Number
x Number
y Number
Inherited From:

drawItem(index)

Parameters:
Name Type Description
index Number

drawItemName(item, x, y, width)

Draws the item name at the specified x and y coordinates within the given width.
Parameters:
Name Type Description
item RPG.BaseItem
x Number
y Number
width Number
Inherited From:

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

Given text or a number, draws the content to the window's contents layer at the specified x and y coordinate within the max width. The text content can also be aligned with the align property. The possible alignments are: "left", "center", "right".
Parameters:
Name Type Description
text string | number
x Number
y Number
maxWidth Number
align String
Inherited From:

drawTextEx(text, x, y) → {Number}

Draws text with text codes included; this will draw icons, increase text height, and more.
Parameters:
Name Type Description
text String
x Number
y Number
Inherited From:
Returns:
Type
Number

ensureCursorVisible()

fittingHeight(numLines) → {Number}

Returns the fitting height given a number of lines based on the line height plus standard padding of the window. Default formula: numLines * lineHeight + standardPadding * 2
Parameters:
Name Type Description
numLines Number
Inherited From:
Returns:
Type
Number

gaugeBackColor() → {String}

Returns the gauage back color as a css color string.
Inherited From:
Returns:
Type
String

hide()

Hides the window, making it invisible; the window is not closed when hidden.
Inherited From:

hideBackgroundDimmer()

Hides the background dimmer sprite.
Inherited From:

hideHelpWindow()

Hides the attached help window.

hitTest(x, y) → {Number}

Parameters:
Name Type Description
x Number
y Number
Returns:
Type
Number

hpColor(actor) → {String}

Returns the hp color as a css string.
Parameters:
Name Type Description
actor Game_Actor
Inherited From:
Returns:
Type
String

hpGaugeColor1() → {String}

Returns the hp gauge color 1 as a css color string.
Inherited From:
Returns:
Type
String

hpGaugeColor2() → {String}

Returns the hp gauge color 2 as a css color string.
Inherited From:
Returns:
Type
String

index() → {Number}

Returns the current position of the _index property.
Returns:
Type
Number

initialize(x, y, width, height)

Parameters:
Name Type Description
x Number
y Number
width Number
height Number
Overrides:

isCancelEnabled() → {Boolean}

Returns:
Type
Boolean

isCancelTriggered() → {Boolean}

Returns:
Type
Boolean

isClosed()

Returns true if the window is completely closed (openness == 0).
Inherited From:

isClosing() → {Boolean}

Returns true if the window is currently closing.
Inherited From:
Returns:
Type
Boolean

isContentsArea(x, y) → {Boolean}

Parameters:
Name Type Description
x Number
y Number
Returns:
Type
Boolean

isCurrentItemEnabled() → {Boolean}

Returns:
Type
Boolean

isCursorMovable() → {Boolean}

Returns:
Type
Boolean

isCursorVisible() → {Boolean}

Determines if the cursor is visible within the window.
Returns:
Type
Boolean

isHandled(symbol) → {Boolean}

Parameters:
Name Type Description
symbol String
Returns:
Type
Boolean

isHorizontal() → {Boolean}

Returns true if the window is horizontal; means the window only has a single row.
Returns:
Type
Boolean

isOkEnabled() → {Boolean}

Determines if ok is enabled as an option; this means whether you can confirm selection of an item within the window.
Returns:
Type
Boolean

isOkTriggered() → {Boolean}

Returns:
Type
Boolean

isOpen()

Returns true if the window is completely open (openness == 255).
Inherited From:

isOpenAndActive() → {Boolean}

Returns:
Type
Boolean

isOpening() → {Boolean}

Returns true if the window is currently opening.
Inherited From:
Returns:
Type
Boolean

isTouchedInsideFrame() → {Boolean}

Returns:
Type
Boolean

isTouchOkEnabled() → {Boolean}

Determines if touch ok is enabled as an option; this means whether you can confirm the selection of an item within the window with touch input.
Returns:
Type
Boolean

itemHeight() → {Number}

Returns the height of an item within the window; determines the height of a row.
Returns:
Type
Number

itemRect(index) → {Rectangle}

Creates a new rectangle based on itemWidth and itemHeight. The rectangle is mainly used for positioning items within the selectable window.
Parameters:
Name Type Description
index Number
Returns:
Type
Rectangle

itemRectForText(index) → {Rectangle}

Creates a new rectangle based on itemWidth and itemHeight The rectangle is used for positioning text within the selectable window.
Parameters:
Name Type Description
index Number
Returns:
Type
Rectangle

itemWidth() → {Number}

Returns the width of an item within the window; determines the width of a column.
Returns:
Type
Number

lineHeight() → {Number}

Returns the standard line height of the current window; default is 36.
Inherited From:
Returns:
Type
Number

loadWindowskin()

Loads the window skin from the img/system directory.
Inherited From:

makeFontBigger()

Makes the font bigger by a value of 12.
Inherited From:

makeFontSmaller()

Makes the font smaller by a value of 12.
Inherited From:

maxCols() → {Number}

Returns the maximum number of columns for the window.
Returns:
Type
Number

maxItems() → {Number}

Returns the maximum number of items within the window; useful to overwrite when creating a new window. This method is used to calculate the number of rows and more.
Returns:
Type
Number

maxPageItems() → {Number}

Returns:
Type
Number

maxPageRows() → {Number}

Returns:
Type
Number

maxRows() → {Number}

Returns:
Type
Number

maxTopRow() → {Number}

Returns:
Type
Number

move(x, y, width, height)

Sets the x, y, width, and height all at once.
Parameters:
Name Type Description
x Number The x coordinate of the window
y Number The y coordinate of the window
width Number The width of the window
height Number The height of the window
Inherited From:

mpColor(actor) → {String}

Returns the mp color as a css color string.
Parameters:
Name Type Description
actor Game_Actor
Inherited From:
Returns:
Type
String

mpCostColor() → {String}

Returns the mp cost color as a css color string.
Inherited From:
Returns:
Type
String

mpGaugeColor1() → {String}

Returns the mp gauge color 1 as a css color string.
Inherited From:
Returns:
Type
String

mpGaugeColor2() → {String}

Returns the mp gauge color 2 as a css color string.
Inherited From:
Returns:
Type
String

normalColor() → {String}

Returns the normal color as a css color string.
Inherited From:
Returns:
Type
String

obtainEscapeCode(textState)

Parameters:
Name Type Description
textState MV.TextState
Inherited From:

obtainEscapeParam(textState) → {number|string}

Obtains the escape parameters from text codes in the text state when drawTextEx is used to draw text.
Parameters:
Name Type Description
textState MV.TextState
Inherited From:
Returns:
Type
number | string

onTouch(triggered)

Parameters:
Name Type Description
triggered Boolean

open()

Opens the window.
Inherited From:

paramchangeTextColor(change)

Changes the text color based on the powerUpColor, powerDownColor and normal color. powerUpColor is any number greater than 0, powerDownColor is any color less than 0, otherwise normal color is returned.
Parameters:
Name Type Description
change Number
Inherited From:

partyMemberName(partyMemberIndex) → {String}

Returns a party member name given an index; the index starts from 1.
Parameters:
Name Type Description
partyMemberIndex Number
Inherited From:
Returns:
Type
String

pendingColor() → {String}

Returns the pending color as a css color string.
Inherited From:
Returns:
Type
String

playBuzzerSound()

Plays the buzzer sound effect when input is incorrect.

playOkSound()

Plays a sound effect when okay is processed.

powerDownColor() → {String}

Returns the power down color as a css color string.
Inherited From:
Returns:
Type
String

powerUpColor() → {String}

Returns the power up color as a css color string.
Inherited From:
Returns:
Type
String

processCancel()

processCharacter(textState)

Process each character in the text when drawTextEx is used to draw text.
Parameters:
Name Type Description
textState MV.TextState
Inherited From:

processCursorMove()

Handles the processing of cursor movement.

processDrawIcon(iconIndex, textState)

Processes drawing an icon when drawTextEx is used for drawing text.
Parameters:
Name Type Description
iconIndex Number
textState MV.TextState
Inherited From:

processEscapeCharacter(code, textState)

Processes escape characters when drawTextEx is used for drawing text.
Parameters:
Name Type Description
code String
textState MV.TextState
Inherited From:

processHandling()

Handles the process of attached handlers.

processNewLine(textState)

Processes new line when drawTextEx is used to draw text.
Parameters:
Name Type Description
textState MV.TextState
Inherited From:

processNewPage(textState)

Processes new page when drawTexttEx is used to draw text.
Parameters:
Name Type Description
textState MV.TextState
Inherited From:

processNormalCharacter(textState)

Processes the normal characters in the text when drawTextEx is used to draw text. Normal characters are letters and numbers.
Parameters:
Name Type Description
textState MV.TextState
Inherited From:

processOk()

processPagedown()

processPageup()

processTouch()

Handles the processing of touch input.

processWheel()

Handles the processing of the scroll wheel within the window.

redrawCurrentItem()

redrawItem(index)

Parameters:
Name Type Description
index Number

refresh()

Refreshes the window contents.

refreshDimmerBitmap()

Refreshes the bitmap attached to the dimmer sprite based on the window dimensions.
Inherited From:

removeChild(child) → {Object}

[super] Removes a child to the container.
Parameters:
Name Type Description
child Object The child to remove
Inherited From:
Returns:
The child that was removed
Type
Object

removeChildAt(index) → {Object}

[super] Removes a child from the specified index position.
Parameters:
Name Type Description
index Number The index to get the child from
Inherited From:
Returns:
The child that was removed
Type
Object

reselect()

Reselects the index based on the window's _index property.

reserveFaceImages()

Reverses the face images of the game party members.
Inherited From:

resetFontSettings()

Resets the font settings of the window back to the default.
Inherited From:

resetScroll()

resetTextColor()

Resets the text color of the window back to the default.
Inherited From:

row() → {Number}

Returns:
Type
Number

scrollDown()

scrollUp()

select(index)

Selects the current index within the window given a number.
Parameters:
Name Type Description
index Number

setBackgroundType(type)

Sets the background type of the window. 0 is 255 window opacity (standard). 1 is the window with background dimmer. Any other number changes the opacity to 0.
Parameters:
Name Type Description
type Number
Inherited From:

setBottomRow(row)

Parameters:
Name Type Description
row Number

setCursorAll(cursorAll)

Parameters:
Name Type Description
cursorAll Boolean

setCursorFixed(cursorFixed)

Sets the _cursorFixed property of the window.
Parameters:
Name Type Description
cursorFixed Boolean

setCursorRect(x, y, width, height)

Sets the position of the command cursor.
Parameters:
Name Type Description
x Number The x coordinate of the cursor
y Number The y coordinate of the cursor
width Number The width of the cursor
height Number The height of the cursor
Inherited From:

setHandler(symbol, method)

Creates a new handler with the symbol as the handler name and a method (JS function) bound to it.
Parameters:
Name Type Description
symbol String
method *

setHelpWindow(helpWindow)

Parameters:
Name Type Description
helpWindow

setHelpWindowItem(item)

Parameters:
Name Type Description
item *

setTone(r, g, b)

Changes the color of the background.
Parameters:
Name Type Description
r Number The red value in the range (-255, 255)
g Number The green value in the range (-255, 255)
b Number The blue value in the range (-255, 255)
Inherited From:

setTopRow(row)

Sets the current top row of the given a number. The top row will then be moved to an index of the window.
Parameters:
Name Type Description
row Number

show()

Shows the window, making it visible.
Inherited From:

showBackgroundDimmer()

Shows the background dimmer sprite.
Inherited From:

showHelpWindow()

Shows the attached help window.

spacing() → {Number}

Returns:
Type
Number

standardBackOpacity() → {Number}

Returns the standard back opacity of the window; this is the opacity of the area behind the window's text content. Default is 192.
Inherited From:
Returns:
Type
Number

standardFontFace() → {String}

Returns the standard font face of the game based on what language the game is in.
Inherited From:
Returns:
Type
String

standardFontSize() → {Number}

Returns the standard font size of the text in window; default is 28.
Inherited From:
Returns:
Type
Number

standardPadding() → {Number}

Returns the standard padding of the window; default is 18.
Inherited From:
Returns:
Type
Number

systemColor() → {String}

Returns the system color as a css color string.
Inherited From:
Returns:
Type
String

textColor(n) → {*}

Returns a text color given a numbered index as a css color string; this index maps directly to the img/system/window.png colors by default.
Parameters:
Name Type Description
n Number
Inherited From:
Returns:
Type
*

textPadding() → {Number}

Returns the text padding of the window; default is 6.
Inherited From:
Returns:
Type
Number

textWidth(text) → {Number}

Calculates the width of a text string and returns a number.
Parameters:
Name Type Description
text String
Inherited From:
Returns:
Type
Number

topIndex() → {Number}

Returns:
Type
Number

topRow() → {Number}

Returns:
Type
Number

tpColor(actor) → {String}

Returns the tp color as a css color string.
Parameters:
Name Type Description
actor Game_Actor
Inherited From:
Returns:
Type
String

tpCostColor() → {String}

Returns the tp cost color as a css color string.
Inherited From:
Returns:
Type
String

tpGaugeColor1() → {String}

Returns the tp gauge color 1 as a css color string.
Inherited From:
Returns:
Type
String

tpGaugeColor2() → {String}

Returns tp gauge color 2 as a css color string.
Inherited From:
Returns:
Type
String

translucentOpacity() → {Number}

Returns the translucentOpacity for the window; The default is 160.
Inherited From:
Returns:
Type
Number

update()

Overrides:

updateArrows()

updateBackgroundDimmer()

Updates the background dimmer sprite opacity based on the openness of the window.
Inherited From:

updateBackOpacity() → {Number}

Returns the inner content width of the window.
Inherited From:
Returns:
Type
Number

updateClose()

Updates the openness of the window when the _closing property is set to true. Openness is decreased.
Inherited From:

updateCursor()

updateHelp()

updateInputData()

updateOpen()

Updates the openness of the window when the _opening property is set to true. Openness is increased.
Inherited From:

updatePadding()

Updates the window padding based on the standardPadding method.
Inherited From:

updateTone()

Updates the tone of the window based on the game system window tone defined in the database.
Inherited From: