Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Window_Base

Super class of all windows within the game. Inherits from the Window class.

class

Window_Base

extends

{Window}

Hierarchy

Index

Constructors

constructor

  • new Window_Base(x: number, y: number, width: number, height: number): Window_Base

Properties

Protected _closing

_closing: boolean

The closing property; determines if the window is closing.

type

{boolean}

memberof

Window_Base

Protected _opening

_opening: boolean

The opening property; determines if the window is opening.

type

{boolean}

memberof

Window_Base

Static Protected _faceHeight

_faceHeight: number

The standard face height; default is 144.

static
type

{number}

memberof

Window_Base

Static Protected _faceWidth

_faceWidth: number

The standard face width; default is 144.

static
type

{number}

memberof

Window_Base

Static Protected _iconHeight

_iconHeight: number

The standard icon height; default is 32.

static
type

{number}

memberof

Window_Base

Static Protected _iconWidth

_iconWidth: number

The standard icon width; default is 32.

static
type

{number}

memberof

Window_Base

Methods

activate

  • activate(): void

actorName

  • actorName(actorIndex: number): string
  • Returns the actor name given an index; the index starts from 1.

    memberof

    Window_Base

    Parameters

    • actorIndex: number

    Returns string

calcTextHeight

  • calcTextHeight(textState: any, all: boolean): 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.

    memberof

    Window_Base

    Parameters

    • textState: any
    • all: boolean

    Returns number

canvasToLocalX

  • canvasToLocalX(x: number): number
  • Returns the x coordinate of the mouse to a local window x coordinate.

    memberof

    Window_Base

    Parameters

    • x: number

    Returns number

canvasToLocalY

  • canvasToLocalY(y: number): number
  • Returns the y coordinate of the mouse to a local window y coordinate.

    memberof

    Window_Base

    Parameters

    • y: number

    Returns number

changePaintOpacity

  • changePaintOpacity(enabled: boolean): void
  • 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.

    memberof

    Window_Base

    Parameters

    • enabled: boolean

    Returns void

changeTextColor

  • changeTextColor(color: string): void

close

  • close(): void

contentsHeight

  • contentsHeight(): number

contentsWidth

  • contentsWidth(): number

convertEscapeCharacters

  • convertEscapeCharacters(text: string): string
  • Converts the escape characters and returns the text content after processing the characters.

    memberof

    Window_Base

    Parameters

    • text: string

    Returns string

createContents

  • createContents(): void

crisisColor

  • crisisColor(): string

deactivate

  • deactivate(): void

deathColor

  • deathColor(): string

dimColor1

  • dimColor1(): string

dimColor2

  • dimColor2(): string

drawActorCharacter

  • drawActorCharacter(actor: Game_Actor, x: number, y: number): void

drawActorClass

  • drawActorClass(actor: Game_Actor, x: number, y: number, width: number): void
  • Draws the actor class at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number

    Returns void

drawActorFace

  • drawActorFace(actor: Game_Actor, x: number, y: number, width: number, height: number): void
  • Draws the actor face at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number
    • height: number

    Returns void

drawActorHp

  • drawActorHp(actor: Game_Actor, x: number, y: number, width: number): void
  • Draws the actor hp at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number

    Returns void

drawActorIcons

  • drawActorIcons(actor: Game_Actor, x: number, y: number, width: number): void
  • Draws the actor icons at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number

    Returns void

drawActorLevel

  • drawActorLevel(actor: Game_Actor, x: number, y: number): any

drawActorMp

  • drawActorMp(actor: Game_Actor, x: number, y: number, width: number): void
  • Draws the actor mp at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number

    Returns void

drawActorName

  • drawActorName(actor: Game_Actor, x: number, y: number, width: number): void
  • Draws the actor name at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number

    Returns void

drawActorNickname

  • drawActorNickname(actor: Game_Actor, x: number, y: number, width: number): void
  • Draws the actor nickname at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number

    Returns void

drawActorSimpleStatus

  • drawActorSimpleStatus(actor: Game_Actor, x: number, y: number, width: number): void
  • Draws a simple status for the game actor passed into the method at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number

    Returns void

drawActorTp

  • drawActorTp(actor: Game_Actor, x: number, y: number, width: number): void
  • Draws the actor tp at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • actor: Game_Actor
    • x: number
    • y: number
    • width: number

    Returns void

drawCharacter

  • drawCharacter(characterName: string, characterIndex: number, x: number, y: number): void
  • 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.

    memberof

    Window_Base

    Parameters

    • characterName: string
    • characterIndex: number
    • x: number
    • y: number

    Returns void

drawCurrencyValue

  • drawCurrencyValue(value: number, unit: string, x: number, y: number, width: number): void
  • 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.

    memberof

    Window_Base

    Parameters

    • value: number
    • unit: string
    • x: number
    • y: number
    • width: number

    Returns void

drawCurrentAndMax

  • drawCurrentAndMax(current: number, max: number, x: number, y: number, width: number, color1: string, color2: string): void
  • 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.

    memberof

    Window_Base

    Parameters

    • current: number
    • max: number
    • x: number
    • y: number
    • width: number
    • color1: string
    • color2: string

    Returns void

drawFace

  • drawFace(faceName: string, faceIndex: number, x: number, y: number, width: number, height: number): void

drawGauge

  • drawGauge(x: number, y: number, width: number, rate: number, color1: string, color2: string): any
  • 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.

    memberof

    Window_Base

    Parameters

    • x: number
    • y: number
    • width: number
    • rate: number
    • color1: string
    • color2: string

    Returns any

drawIcon

  • drawIcon(iconIndex: number, x: number, y: number): void
  • 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.

    memberof

    Window_Base

    Parameters

    • iconIndex: number
    • x: number
    • y: number

    Returns void

drawItemName

  • drawItemName(item: BaseItem, x: number, y: number, width: number): void
  • Draws the item name at the specified x and y coordinates within the given width.

    memberof

    Window_Base

    Parameters

    • item: BaseItem
    • x: number
    • y: number
    • width: number

    Returns void

drawText

  • drawText(text: string | number, x: number, y: number, maxWidth: number, align: string): void
  • 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".

    memberof

    Window_Base

    Parameters

    • text: string | number
    • x: number
    • y: number
    • maxWidth: number
    • align: string

    Returns void

drawTextEx

  • drawTextEx(text: string, x: number, y: number): number
  • Draws text with text codes included; this will draw icons, increase text height, and more.

    memberof

    Window_Base

    Parameters

    • text: string
    • x: number
    • y: number

    Returns number

fittingHeight

  • fittingHeight(numLines: number): 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

    memberof

    Window_Base

    Parameters

    • numLines: number

    Returns number

gaugeBackColor

  • gaugeBackColor(): string

hide

  • hide(): void

hideBackgroundDimmer

  • hideBackgroundDimmer(): void

hpColor

hpGaugeColor1

  • hpGaugeColor1(): string

hpGaugeColor2

  • hpGaugeColor2(): string

isClosing

  • isClosing(): boolean

isOpening

  • isOpening(): boolean

lineHeight

  • lineHeight(): number

loadWindowSkin

  • loadWindowSkin(): void

makeFontBigger

  • makeFontBigger(): void

makeFontSmaller

  • makeFontSmaller(): void

mpColor

mpCostColor

  • mpCostColor(): string

mpGaugeColor1

  • mpGaugeColor1(): string

mpGaugeColor2

  • mpGaugeColor2(): string

normalColor

  • normalColor(): string

obtainEscapeCode

  • obtainEscapeCode(textState: TextState): string

obtainEscapeParam

  • obtainEscapeParam(textState: TextState): number | string
  • Obtains the escape parameters from text codes in the text state when drawTextEx is used to draw text.

    memberof

    Window_Base

    Parameters

    Returns number | string

open

  • open(): void

paramchangeTextColor

  • paramchangeTextColor(change: number): void
  • 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.

    memberof

    Window_Base

    Parameters

    • change: number

    Returns void

partyMemberName

  • partyMemberName(partyMemberIndex: number): string
  • Returns a party member name given an index; the index starts from 1.

    memberof

    Window_Base

    Parameters

    • partyMemberIndex: number

    Returns string

pendingColor

  • pendingColor(): string

powerDownColor

  • powerDownColor(): string

powerUpColor

  • powerUpColor(): string

processCharacter

  • processCharacter(textState: TextState): void

processDrawIcon

  • processDrawIcon(iconIndex: number, textState: TextState): void

processEscapeCharacter

  • processEscapeCharacter(code: string, textState: TextState): void

processNewLine

processNewPage

processNormalCharacter

  • processNormalCharacter(textState: TextState): void
  • Processes the normal characters in the text when drawTextEx is used to draw text. Normal characters are letters and numbers.

    memberof

    Window_Base

    Parameters

    Returns void

refreshDimmerBitmap

  • refreshDimmerBitmap(): void

reserveFaceImages

  • reserveFaceImages(): void

resetFontSettings

  • resetFontSettings(): void

resetTextColor

  • resetTextColor(): void

setBackgroundType

  • setBackgroundType(type: number): void
  • 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.

    memberof

    Window_Base

    Parameters

    • type: number

    Returns void

show

  • show(): void

showBackgroundDimmer

  • showBackgroundDimmer(): void

standardBackOpacity

  • 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.

    memberof

    Window_Base

    Returns number

standardFontFace

  • standardFontFace(): string

standardFontSize

  • standardFontSize(): number

standardPadding

  • standardPadding(): number

systemColor

  • systemColor(): string

textColor

  • textColor(n: number): string
  • 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.

    memberof

    Window_Base

    Parameters

    • n: number

    Returns string

textPadding

  • textPadding(): number

textWidth

  • textWidth(text: string): number

tpColor

tpCostColor

  • tpCostColor(): string

tpGaugeColor1

  • tpGaugeColor1(): string

tpGaugeColor2

  • tpGaugeColor2(): string

translucentOpacity

  • translucentOpacity(): number

update

  • update(): void
  • The update method of the window; this is run every frame to do logic processing for the window.

    memberof

    Window_Base

    Returns void

updateBackOpacity

  • updateBackOpacity(): void

updateBackgroundDimmer

  • updateBackgroundDimmer(): void

updateClose

  • updateClose(): void
  • Updates the openness of the window when the _closing property is set to true. Openness is decreased.

    memberof

    Window_Base

    Returns void

updateOpen

  • updateOpen(): void
  • Updates the openness of the window when the _opening property is set to true. Openness is increased.

    memberof

    Window_Base

    Returns void

updatePadding

  • updatePadding(): void

updateTone

  • updateTone(): void
  • Updates the tone of the window based on the game system window tone defined in the database.

    memberof

    Window_Base

    Returns void

Generated using TypeDoc