The window for inputting quantity of items to buy or sell on the shop screen.
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
- 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
heightnumberinherited
- The height of the window in pixels
innerHeightnumberreadonlyinherited
- The height of the content area in pixels
- 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
upArrowVisiblebooleaninherited
- The visibility of the up scroll arrow
widthnumberinherited
- The width of the window in pixels
- The image used as a window skin
Methods
activate()inherited
- Activates the window
actorName(n)stringinherited
- Gets an actor name from their id
Name Type Description n
number Actor id Returns:
Type Description string The actor's name addChildToBack(child)objectinherited
- Adds a child between the background and contents
Name Type Description child
object The child to add Returns:
Type Description object The child that was added addInnerChild(child)objectinherited
- Adds a child to the client area
Name Type Description child
object The child to add Returns:
Type Description object The child that was added - Creates a rectangle for an item of text
Returns:
Type Description Rectangle Rectangle that encompasses the text item - Get the spacing between buttons
Returns:
Type Description number Spacing between buttons - Get the y coordinate of the Touch UI buttons
Returns:
Type Description number The y coordinate of the buttons calcTextHeight(textState)stringinherited
- Calculates the height of the text in a text state
Name Type Description textState
Object The text state object Returns:
Type Description string The height of the text callCancelHandler()inherited
- Calls the cancel handler function
callHandler(symbol)inherited
- Calls a handler function
Name Type Description symbol
string The id (or symbol) of the function callOkHandler()inherited
- Calls the ok handler function
callUpdateHelp()inherited
- Calls the updateHelp function if the window is active and there is a help window
- Change the window's number
Name Type Description amount
number Amount to change by changeOutlineColor(color)inherited
- Changes the text outline color of text drawn to the window
Name Type Description color
string The new outline color to use changePaintOpacity(enabled)inherited
- Changes the opacity of what is painted to the contents of the window
Name Type Description enabled
boolean True = use full opacity | False = use translucent opacity changeTextColor(color)inherited
- Changes the text color of text drawn to the window
Name Type Description color
string The new color to draw text in checkRectObject(rect)booleaninherited
- Checks if the given rect parameter is a valid Rectangle
Name Type Description rect
* The object to check for validity Throws:
Error if the object is not a valid rectangleReturns:
Type Description boolean True if the object is a valid rectangle clearItem(index)inherited
- Clears the item at the given index
Name Type Description index
number The index of the item to clear clearScrollStatus()inherited
- Clears scrolling status to defaults
close()inherited
- Start closing the window
colSpacing()numberinherited
- Get the spacing between columns
Returns:
Type Description number Spacing between columns contentsHeight()numberinherited
- Get the height of the contents
Returns:
Type Description number Contents height contentsWidth()numberinherited
- Gets the width needed for the window contents
Returns:
Type Description number Width needed for the window contents convertEscapeCharacters(text)stringinherited
- Converts escape code characters in text, for example \v[x]
Name Type Description text
string The text to convert Returns:
Type Description string Text with escape characters converted - Create the Touch UI buttons
createContents()inherited
- Creates the contents of the window
createDimmerSprite()inherited
- Creates the background dimmer sprite
createTextBuffer(rtl)stringinherited
- Creates a text buffer
Name Type Description rtl
boolean If the text is right to left (such as arabic text) Returns:
Type Description string The 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
Name Type Description text
string The text to draw x
number The x coordinate to draw the text y
number The y coordinate to draw the text width
number The width of the text Returns:
Type Description Object The text state object cursorAll()booleaninherited
- Get the cursor all flag
Returns:
Type Description boolean The cursor all flag cursorDown(wrap)inherited
- Handling for when the cursor moves down
Name Type Description wrap
boolean If the cursor should wrap cursorFixed()booleaninherited
- Gheck if the cursor is fixed
Returns:
Type Description boolean True if the cursor is fixed cursorLeft(wrap)inherited
- Handling for when the cursor moves left
Name Type Description wrap
boolean If the cursor should wrap cursorPagedown()inherited
- Handling for when the cursor moves by pagedown
cursorPageup()inherited
- Handling for when the cursor moves by pageup
cursorRight(wrap)inherited
- Handling for when the cursor moves right
Name Type Description wrap
boolean If the cursor should wrap cursorUp(wrap)inherited
- Handling for when the cursor moves up
Name Type Description wrap
boolean If the cursor should wrap - Get the width of the cursor
Returns:
Type Description number The width of the cursor - Get the x coordinate of the cursor
Returns:
Type Description number The x coordinate of the cursor deactivate()inherited
- Deactivates the window
deselect()inherited
- Deselects from the window
destroy()inherited
- Destroys the window
destroyContents()inherited
- Destroys the contents of the window
drawAllItems()inherited
- Draws all the items
drawBackgroundRect(rect)inherited
- Draws a background rect
Name Type Description rect
Rectangle The rectangle for where to draw the background drawCharacter(characterName, characterIndex, x, y)inherited
- Draws a character at x/y coordinates
Name Type Description characterName
string The name of the character sheet bitmap characterIndex
number The index of the character on the sheet x
number The x coordinate y
number The y coordinate drawCurrencyValue(value, unit, x, y, width)inherited
- Draws a currency value
Name Type Description value
number The amount of currency unit
string The currency unit x
number The x coordinate y
number The y coordinate width
number The width available to draw the item name - Draw the current item's name
drawFace(faceName, faceIndex, x, y, width, height)inherited
- Draws a face at x/y coordinates with width/height
Name Type Description faceName
string The name of the face sheet bitmap faceIndex
number The index of the face on the sheet x
number The x coordinate y
number The y coordinate width
number The width of the face height
number The height of the face - Draws a horizontal line
drawIcon(iconIndex, x, y)inherited
- Draws an icon at x/y coordinates
Name Type Description iconIndex
number The index of the icon to draw x
number The x coordinate y
number The y coordinate drawItem()inherited
- Draws an individual item
drawItemBackground(index)inherited
- Draws the background at the given index
Name Type Description index
number The index to draw the background drawItemName(item, x, y, width)inherited
- Draws an item's name with its icon
Name Type Description item
Object The item object to draw, must at least have iconIndex and name properties x
number The x coordinate y
number The y coordinate width
number The width available to draw the item name - Draw the multiplication sign
- Draw the window's number
drawRect(x, y, width, height)inherited
- Draws a rectangle of given width/height at given x/y coordinates
Name Type Description x
number The X coordinate of the upper left corner of the rectangle y
number The Y coordinate of the upper left corner of the rectangle width
number The width in pixels of the rectangle height
number The height in pixels of the rectangle drawShape()inherited
- 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.
Name Type Description text
string The text to draw x
number The x coordinate to begin drawing the text y
number The y coordinate to begin drawing the text maxWidth
number The maximum width in pixels of the text align
string The alignment of the text drawTextEx(text, x, y, width)numberinherited
- Draws text to the window's contents. Does support text codes.
Name Type Description text
string The text to draw x
number The x coordinate to draw the text y
number The y coordinate to draw the text width
number The width of the text Returns:
Type Description number The width of the drawn text - Draws the total price
ensureCursorVisible(smooth)inherited
- Ensure the cursor is visible by scrolling if needed
Name Type Description smooth
boolean Whether to smooth scroll if cursor is not visible fittingHeight(numLines)numberinherited
- Calculates the height needed for a given number of lines
Name Type Description numLines
number The number of lines to calculate the height of Returns:
Type Description number The height needed to fit the amount of lines flushTextState(textState)inherited
- Flushes the text state
Name Type Description textState
Object The text state to flush forceSelect(index)inherited
- Forcibly select an index
Name Type Description index
number The index to select - Stops displaying the window
hideBackgroundDimmer()inherited
- Hides the background dimmer sprite
hideHelpWindow()inherited
- Hides the associated help window
hitIndex()numberinherited
- Check which index is hit
Returns:
Type Description number The index that is hit hitTest(x, y)numberinherited
- Test if an index is hit at given x/y coordinates
Name Type Description x
number The x coordinate to check y
number The y coordinate to check Returns:
Type Description number The index at the given coordinates index()numberinherited
- Get the current index
Returns:
Type Description number The currently selected index - Initializes the window
isCancelEnabled()booleaninherited
- Check if cancel is enabled
Returns:
Type Description boolean True if cancel is enabled isCancelTriggered()booleaninherited
- Check if cancel input is triggered
Returns:
Type Description boolean True if cancel input is triggered isClosed()booleaninherited
- Checks whether the window is completely closed (openness == 0)
Returns:
Type Description boolean True if the window is closed isClosing()booleaninherited
- Check if the window is closing
Returns:
Type Description boolean True if window is currently closing isCurrentItemEnabled()booleaninherited
- Check if the item at the currently selected index is enabled
Returns:
Type Description boolean True if the current item is enabled isCursorMovable()booleaninherited
- Check if the cursor can be moved
Returns:
Type Description boolean True if the cursor can be moved isHandled(symbol)booleaninherited
- Check if there is a handler function for a symbol
Name Type Description symbol
string The id (or symbol) of the function Returns:
Type Description boolean True if a function exists for that symbol isHorizontal()booleaninherited
- Check if there is only one row
Returns:
Type Description boolean True if only one row isHoverEnabled()booleaninherited
- Determine if hovering is enabled
Returns:
Type Description boolean True if hovering is enabled isOkEnabled()booleaninherited
- Check if OK is enabled
Returns:
Type Description boolean True if OK is enabled isOkTriggered()booleaninherited
- Check if OK input is triggered
Returns:
Type Description boolean True if OK input is triggered isOpen()booleaninherited
- Checks whether the window is completely open (openness == 255)
Returns:
Type Description boolean True if the window is open isOpenAndActive()booleaninherited
- Check if the window is open and active
Returns:
Type Description boolean True if the window is both open and active (and visible) isOpening()booleaninherited
- Check if the window is opening
Returns:
Type Description boolean True if window is currently opening isScrollEnabled()booleanoverrides
- Check if scroll is enabled. By default, in Window_ShopNumber, this is always false
Returns:
Type Description boolean True if scroll is enabled isTouchOkEnabled()booleanoverrides
- Check if touch ok is enabled. By default, in Window_ShopNumber, this is always false
Returns:
Type Description boolean True if touch ok is enabled isTouchScrollEnabled()booleaninherited
- Check if touch scrolling is enabled
Returns:
Type Description boolean True if the player can scroll the window using the touch controls isTouchedInsideFrame()booleaninherited
- Check if the last touch input was inside the window
Returns:
Type Description boolean True if touched inside the window isWheelScrollEnabled()booleaninherited
- Check if wheel scrolling is enabled
Returns:
Type Description boolean True if the player can scroll the window using the mouse wheel itemHeight()numberinherited
- Gets the height in pixels of an item
Returns:
Type Description number Height of an item - Gets the rectangle that covers the item at the given index, after applying x and y padding
Name Type Description index
number The index of the item Returns:
Type Description Rectangle The rectangle that covers the item - Get the y coordinate of the item name
Returns:
Type Description number The y coordinate of the item name itemPadding()numberinherited
- Gets the padding for an item
Returns:
Type Description number Amount of item padding - Get the item rect
Returns:
Type Description Rectangle Rectangle object covering the item's drawable area - Gets the rectangle that covers the item at the given index, after applying x padding
Name Type Description index
number The index of the item Returns:
Type Description Rectangle The rectangle that covers the item itemWidth()numberinherited
- Get the width of an item
Returns:
Type Description number Width of one item lineHeight()numberinherited
- Gets the height in pixels of one line
Returns:
Type Description number Height of a line loadWindowskin()inherited
- Loads the windowskin for the window
makeFontBigger()inherited
- Makes the font size bigger by 12
makeFontSmaller()inherited
- Makes the font size smaller by 12
maxCols()numberinherited
- Get the amount of columns
Returns:
Type Description number Amount of columns - Get the maximum amount of digits
Returns:
Type Description number The max amount of digits maxFontSizeInLine(line)numberinherited
- Gets the max font size in a line of text
Name Type Description line
string The line of text Returns:
Type Description number The largest font size seen in the line of text maxItems()numberinherited
- Get the amount of items
Returns:
Type Description number Amount of items maxPageItems()numberinherited
- Gets the number of items in a page
Returns:
Type Description number The number of items in a page maxPageRows()numberinherited
- Gets the number of rows in a page
Returns:
Type Description number The number of rows in a page maxRows()numberinherited
- Get number of rows
Returns:
Type Description number Amount of rows maxScrollX()numberinherited
- Get the maximum scroll x position
Returns:
Type Description number The maximum scroll x position maxScrollY()numberinherited
- Get the maximum scroll y position
Returns:
Type Description number The maximum scroll y position maxTopRow()numberinherited
- Gets the max top row
Returns:
Type Description number The max top row maxVisibleItems()numberinherited
- Gets the number of visible items
Returns:
Type Description number The number of visible items move(x, y, width, height)inherited
- Sets the x, y, width, and height of the window
Name Type Description x
number The new x coordinate of the window y
number The new y coordinate of the window width
number The new width of the window height
number The new height of the window moveCursorBy(x, y)inherited
- Moves the cursor position by the given amount
Name Type Description x
number The amount of horizontal movement y
number The amount of vertical movement moveInnerChildrenBy(x, y)inherited
- Moves the inner children by the given amount
Name Type Description x
number The amount of horizontal movement y
number The amount of vertical movement - Get the multiplication sign character
Returns:
Type Description string The multiplication sign character - Get the x coordinate of the multiplication sign
Returns:
Type Description number The x coordinate of the multiplication sign - Get the window's number
Returns:
Type Description number The window's number obtainEscapeCode(textState)stringinherited
- Gets an escape code
Name Type Description textState
Object The text state object Returns:
Type Description string The escape code, will be empty string if none obtainEscapeParam(textState)int | stringinherited
- Gets an escape param
Name Type Description textState
Object The text state object Returns:
Type Description int|string The escape param, will be empty string if none - Processing for down Touch UI button press
- Processing for down2 Touch UI button press
- Processing for ok Touch UI button press
- Processing for up Touch UI button press
- Processing for up2 Touch UI button press
onTouchCancel()inherited
- Handling for touch cancel input
onTouchOk()inherited
- Handling for touch OK input
onTouchScroll()inherited
- Handling for when touch scrolling starts
onTouchScrollEnd()inherited
- Handling for when touch scrolling ends
onTouchScrollStart()inherited
- Handling for when scrolling starts
onTouchSelect(trigger)inherited
- Handling for when touch is selected
Name Type Description trigger
boolean If triggered or just hovered - Start opening the window
overallHeight()numberinherited
- Get the total height
Returns:
Type Description number Total height overallWidth()numberinherited
- Get the overall width of the window
Returns:
Type Description number The overall width of the window - Clears and then draws the window content
partyMemberName(n)stringinherited
- Gets an actor name from their position in the party
Name Type Description n
number Position in the party Returns:
Type Description string The actor's name - Place the Touch UI buttons
playBuzzerSound()inherited
- Plays the buzzer sound effect
playCursorSound()inherited
- Plays the cursor sound effect
playOkSound()overrides
- Plays the OK sound. In Window_ShopNumber, this does nothing
processAllText(textState)inherited
- Processes all text within a text state object
Name Type Description textState
Object The text state to process processCancel()inherited
- Processing for cancel input
processCharacter(textState)inherited
- Processes a character in a text state at the current index of the text state
Name Type Description textState
Object The text state object for processing a character processColorChange(colorIndex)inherited
- Processes a color change
Name Type Description colorIndex
number The index of the color to change to processControlCharacter(textState, c)inherited
- Processes a control character within a text state
Name Type Description textState
Object The text state object with the character c
string The character to process processCursorMove()inherited
- Processing for a cursor move
processDrawIcon(iconIndex, textState)inherited
- Processes drawing an icon
Name Type Description iconIndex
number The index of the icon to draw textState
Object The text state object processEscapeCharacter(code, textState)inherited
- Processes an escape character in a text state
Name Type Description code
string The escape character's code textState
Object The text state object processHandling()inherited
- Processing for handled methods
processNewLine(textState)inherited
- Processing for a new line
Name Type Description textState
Object The text state object - Processing for changing the window's number
processOk()inherited
- Processing for ok input
processPagedown()inherited
- Processing for pagedown
processPageup()inherited
- Processing for pageup
processTouch()inherited
- Processing for when touched
processTouchScroll()inherited
- Processing for scrolling by touch
processWheelScroll()inherited
- Processing for scrolling by mouse wheel
redrawCurrentItem()inherited
- Redraws the currently selected item
redrawItem(index)inherited
- Redraws the item at the given index
Name Type Description index
number The index of the item to redraw - Refreshes the window
refreshCursor()inherited
- Refreshes the cursor
refreshCursorForAll()inherited
- Refreshes the cursor for all
refreshDimmerBitmap()inherited
- Refreshes the background dimmer sprite
reselect()inherited
- Reselects the last index that was selected
resetFontSettings()inherited
- Resets font settings to defaults
resetTextColor()inherited
- Resets text and outline color to defaults
row()numberinherited
- Gets the current row
Returns:
Type Description number The current row rowSpacing()numberinherited
- Get the spacing between rows
Returns:
Type Description number Spacing between rows scrollBaseX()numberinherited
- Get the base scroll X position
Returns:
Type Description number The base scroll X position scrollBaseY()numberinherited
- Get the base scroll Y position
Returns:
Type Description number The base scroll Y position scrollBlockHeight()numberinherited
- Get the height of one block for scrolling
Returns:
Type Description number The height of a scroll block scrollBlockWidth()numberinherited
- Get the width of one block for scrolling
Returns:
Type Description number The width of a scroll block scrollBy(x, y)inherited
- Add to the x and y scroll position
Name Type Description x
number The amount to add to the scroll x position y
number The amount to add to the scroll y position scrollTo(x, y)inherited
- Scroll to a set position
Name Type Description x
number The x position to scroll to y
number The y position to scroll to scrollX()numberinherited
- Get the current scroll X position
Returns:
Type Description number The x position of the scroll scrollY()numberinherited
- Get the current scroll Y position
Returns:
Type Description number The y position of the scroll select(index)inherited
- Selects the given index
Name Type Description index
number The index to select setBackgroundType(type)inherited
- Sets the background type of the window
Name Type Description type
number The type of background (0 = normal, 1 = dim, 2 = transparent) - Set the currency unit
Name Type Description currencyUnit
string The currency unit setCursorAll(cursorAll)inherited
- Set the cursor all flag
Name Type Description cursorAll
boolean The new cursor all setting setCursorFixed(cursorFixed)inherited
- Set the cursor fixed flag
Name Type Description cursorFixed
boolean The new cursor fixed setting setCursorRect(x, y, width, height)inherited
- Sets the position of the command cursor
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 setHandler(symbol, method)inherited
- Sets a handler function
Name Type Description symbol
string The id (or symbol) of the function method
function The method to call when the symbol is called setHelpWindow(helpWindow)inherited
- Associates the given help window with this window
Name Type Description helpWindow
Window_Help The help window setHelpWindowItem(item)inherited
- Sets the help window item
Name Type Description item
* The object to pass to the help window setScrollAccel(x, y)inherited
- Sets the x and y scroll acceleration
Name Type Description x
number The x scroll acceleration y
number The y scroll acceleration setTone(r, g, b)inherited
- Changes the color of the background
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) setTopRow(row)inherited
- Sets the top row by scrolling to the row
Name Type Description row
number The row to scroll to - Set up the window
Name Type Description item
Object The item object max
number The maximum amount of the item price
number The price of the item - Displays the window
showBackgroundDimmer()inherited
- Shows the background dimmer sprite
showHelpWindow()inherited
- Shows the associated help window
smoothScrollBy(x, y)inherited
- Add to the x and y scroll position over an amount of time
Name Type Description x
number The amount to add to the scroll x position y
number The amount to add to the scroll y position smoothScrollDown(n)inherited
- Smoothly scroll down
Name Type Description n
number The amount of items to scroll down smoothScrollTo(x, y)inherited
- Scroll to a set position over an amount of time
Name Type Description x
number The x position to scroll to y
number The y position to scroll to smoothScrollUp(n)inherited
- Smoothly scroll up
Name Type Description n
number The amount of items to scroll up smoothSelect(index)inherited
- Smoothly selects an index
Name Type Description index
number The index to select systemColor()stringinherited
- Gets the system text color
Returns:
Type Description string The system text color textSizeEx(text)Objectinherited
- Calculates the width needed for a given string of text. Does support text codes.
Name Type Description text
string The text to calculate the width for Returns:
Type Description Object The width and height of the text textWidth(text)numberinherited
- Calculates the width needed for a given string of text. Does not support text codes.
Name Type Description text
string The text to calculate the width for Returns:
Type Description number The width of the text topIndex()numberinherited
- Gets the top index
Returns:
Type Description number The top index topRow()numberinherited
- Gets the top row
Returns:
Type Description number The top row - Calculate the total horizontal space of the Touch UI buttons
Returns:
Type Description number Total width of Touch UI buttons - Get the y coordinate of the total price
Returns:
Type Description number The y coordinate of the total price translucentOpacity()numberinherited
- Gets the opacity to use for a translucent effect
Returns:
Type Description number The opacity to use for a translucent effect - Updates the window for each frame
updateArrows()inherited
- Updates the arrow up/down visibility
updateBackOpacity()inherited
- Updates the window's background opacity
updateBackgroundDimmer()inherited
- Updates the background dimmer sprite
updateClose()inherited
- Updates the closing effect
updateHelp()inherited
- Updates the help window
updateInputData()inherited
- Update input data
updateOpen()inherited
- Updates the opening effect
updateOrigin()inherited
- Updates the window origin
updatePadding()inherited
- Updates the window's padding
updateScrollAccel()inherited
- Updates the scroll acceleration
updateScrollBase(baseX, baseY)inherited
- Updates the scroll base
Name Type Description baseX
number The new base x of the scroll baseY
number The new base y of the scroll updateSmoothScroll()inherited
- Updates smooth scrolling
updateTone()inherited
- Updates the window's tone
updateTransform()inherited
- Updates the transform on all children of this container for rendering