Class: Window_NameBox

Window_NameBox

new Window_NameBox()

The window for displaying a speaker name above the message window.

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)

cursorVisiblebooleaninherited

The visibility of the cursor

downArrowVisiblebooleaninherited

The visibility of the down scroll arrow

frameVisiblebooleaninherited

The visibility of the frame

heightnumberinheritedoverrides

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)

opennessnumberinheritedoverrides

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

upArrowVisiblebooleaninherited

The visibility of the up scroll arrow
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
Clears the name from the window
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

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

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
Start opening the window

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
Refreshes the window

refreshDimmerBitmap()inherited

Refreshes the background dimmer sprite

resetFontSettings()inherited

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

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

setMessageWindow(messageWindow)

Associates a message window with this window
NameTypeDescription
messageWindowWindow_MessageThe message window
Sets the name to show in the window
NameTypeDescription
namestringThe name to display

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
Starts the window

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

updateBackOpacity()inherited

Updates the window's background opacity

updateBackground()

Updates the background type of the window

updateBackgroundDimmer()inherited

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

updatePlacement()

Updates the placement of the window
Updates the window's tone

updateTransform()inherited

Updates the transform on all children of this container for rendering

windowHeight()number

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

windowWidth()number

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