Skip to content

Window_Selectable ⇐ Window_Base

Kind: global class
Extends: Window_Base

  • Window_Selectable ⇐ Window_Base
    • new Window_Selectable()
    • .initialize(x, y, width, height)
    • .index() ⇒ number
    • .cursorFixed() ⇒ boolean
    • .setCursorFixed(cursorFixed)
    • .cursorAll() ⇒ boolean
    • .setCursorAll(cursorAll)
    • .maxCols() ⇒ number
    • .maxItems() ⇒ number
    • .spacing() ⇒ number
    • .itemWidth() ⇒ number
    • .itemHeight() ⇒ number
    • .maxRows() ⇒ number
    • .activate()
    • .deactivate()
    • .select(index)
    • .deselect()
    • .reselect()
    • .row() ⇒ number
    • .topRow() ⇒ number
    • .maxTopRow() ⇒ number
    • .setTopRow(row)
    • .resetScroll()
    • .maxPageRows() ⇒ number
    • .maxPageItems() ⇒ number
    • .isHorizontal() ⇒ boolean
    • .bottomRow() ⇒ number
    • .setBottomRow(row)
    • .topIndex() ⇒ number
    • .itemRect(index) ⇒ Rectangle
    • .itemRectForText(index) ⇒ Rectangle
    • .setHelpWindow(helpWindow)
    • .showHelpWindow()
    • .hideHelpWindow()
    • .setHandler(symbol, method)
    • .isHandled(symbol) ⇒ boolean
    • .callHandler(symbol)
    • .isOpenAndActive() ⇒ boolean
    • .isCursorMovable() ⇒ boolean
    • .cursorDown(wrap)
    • .cursorUp(wrap)
    • .cursorRight(wrap)
    • .cursorLeft(wrap)
    • .cursorPagedown()
    • .cursorPageup()
    • .scrollDown()
    • .scrollUp()
    • .update()
    • .updateArrows()
    • .processCursorMove()
    • .processHandling()
    • .processWheel()
    • .processTouch()
    • .isTouchedInsideFrame() ⇒ boolean
    • .onTouch(triggered)
    • .hitTest(x, y) ⇒ number
    • .isContentsArea(x, y) ⇒ boolean
    • .isTouchOkEnabled() ⇒ boolean
    • .isOkEnabled() ⇒ boolean
    • .isCancelEnabled() ⇒ boolean
    • .isOkTriggered() ⇒ boolean
    • .isCancelTriggered() ⇒ boolean
    • .processOk()
    • .playOkSound()
    • .playBuzzerSound()
    • .callOkHandler()
    • .processCancel()
    • .callCancelHandler()
    • .processPageup()
    • .processPagedown()
    • .updateInputData()
    • .updateCursor()
    • .isCursorVisible() ⇒ boolean
    • .ensureCursorVisible()
    • .callUpdateHelp()
    • .updateHelp()
    • .setHelpWindowItem(item)
    • .isCurrentItemEnabled() ⇒ boolean
    • .drawAllItems()
    • .drawItem(index)
    • .clearItem(index)
    • .redrawItem(index)
    • .redrawCurrentItem()
    • .refresh()

new Window_Selectable()

Window_Selectable
具有光标移动和滚动功能的窗口类。
The window class with cursor movement and scroll functions.


window_Selectable.initialize(x, y, width, height)

初始化方法
Initialize method

Kind: instance method of Window_Selectable

ParamTypeDescription
xnumber窗口的x坐标
ynumber窗口的y坐标
widthnumber窗口的宽度
heightnumber窗口的高度

window_Selectable.index() ⇒ number

获取当前索引
Gets the current index

Kind: instance method of Window_Selectable
Returns: number - 当前索引值 | Current index value


window_Selectable.cursorFixed() ⇒ boolean

光标固定
获取光标是否固定状态
Cursor fixed
Gets whether the cursor is fixed

Kind: instance method of Window_Selectable
Returns: boolean - 光标是否固定 | Whether the cursor is fixed


window_Selectable.setCursorFixed(cursorFixed)

设置光标固定状态
Sets whether the cursor is fixed

Kind: instance method of Window_Selectable

ParamTypeDescription
cursorFixedboolean光标是否固定

window_Selectable.cursorAll() ⇒ boolean

光标所有
获取光标是否选中所有项目
Cursor all
Gets whether all items are selected

Kind: instance method of Window_Selectable
Returns: boolean - 是否选中所有项目 | Whether all items are selected


window_Selectable.setCursorAll(cursorAll)

设置光标选中所有项目
Sets whether to select all items

Kind: instance method of Window_Selectable

ParamTypeDescription
cursorAllboolean是否选中所有项目

window_Selectable.maxCols() ⇒ number

获取最大列数
Gets the maximum number of columns

Kind: instance method of Window_Selectable
Returns: number - 最大列数 | Maximum number of columns


window_Selectable.maxItems() ⇒ number

获取最大项目数
Gets the maximum number of items

Kind: instance method of Window_Selectable
Returns: number - 最大项目数 | Maximum number of items


window_Selectable.spacing() ⇒ number

获取项目间隔
Gets the spacing between items

Kind: instance method of Window_Selectable
Returns: number - 项目间隔 | Spacing between items


window_Selectable.itemWidth() ⇒ number

获取项目宽度
Gets the width of each item

Kind: instance method of Window_Selectable
Returns: number - 项目宽度 | Width of each item


window_Selectable.itemHeight() ⇒ number

获取项目高度
Gets the height of each item

Kind: instance method of Window_Selectable
Returns: number - 项目高度 | Height of each item


window_Selectable.maxRows() ⇒ number

获取最大行数
Gets the maximum number of rows

Kind: instance method of Window_Selectable
Returns: number - 最大行数 | Maximum number of rows


window_Selectable.activate()

激活窗口
Activates the window

Kind: instance method of Window_Selectable


window_Selectable.deactivate()

停用窗口
Deactivates the window

Kind: instance method of Window_Selectable


window_Selectable.select(index)

选择指定索引的项目
Selects an item by index

Kind: instance method of Window_Selectable

ParamTypeDescription
indexnumber要选择的索引

window_Selectable.deselect()

取消选择
Deselects the current item

Kind: instance method of Window_Selectable


window_Selectable.reselect()

重新选择
Reselects the current item

Kind: instance method of Window_Selectable


window_Selectable.row() ⇒ number

获取当前行号
Gets the current row number

Kind: instance method of Window_Selectable
Returns: number - 当前行号 | Current row number


window_Selectable.topRow() ⇒ number

获取顶部行号
Gets the top row number

Kind: instance method of Window_Selectable
Returns: number - 顶部行号 | Top row number


window_Selectable.maxTopRow() ⇒ number

获取最大顶部行号
Gets the maximum top row number

Kind: instance method of Window_Selectable
Returns: number - 最大顶部行号 | Maximum top row number


window_Selectable.setTopRow(row)

设置顶部行号
Sets the top row number

Kind: instance method of Window_Selectable

ParamTypeDescription
rownumber顶部行号

window_Selectable.resetScroll()

重置滚动
Resets the scroll position

Kind: instance method of Window_Selectable


window_Selectable.maxPageRows() ⇒ number

获取最大页面行数
Gets the maximum number of rows per page

Kind: instance method of Window_Selectable
Returns: number - 最大页面行数 | Maximum number of rows per page


window_Selectable.maxPageItems() ⇒ number

获取最大页面项目数
Gets the maximum number of items per page

Kind: instance method of Window_Selectable
Returns: number - 最大页面项目数 | Maximum number of items per page


window_Selectable.isHorizontal() ⇒ boolean

判断是否为横向布局
Checks if the layout is horizontal

Kind: instance method of Window_Selectable
Returns: boolean - 是否为横向布局 | Whether the layout is horizontal


window_Selectable.bottomRow() ⇒ number

获取底部行号
Gets the bottom row number

Kind: instance method of Window_Selectable
Returns: number - 底部行号 | Bottom row number


window_Selectable.setBottomRow(row)

设置底部行号
Sets the bottom row number

Kind: instance method of Window_Selectable

ParamTypeDescription
rownumber底部行号

window_Selectable.topIndex() ⇒ number

获取顶部索引
Gets the top index

Kind: instance method of Window_Selectable
Returns: number - 顶部索引 | Top index


window_Selectable.itemRect(index) ⇒ Rectangle

获取项目的矩形区域
Gets the rectangle area for an item

Kind: instance method of Window_Selectable
Returns: Rectangle - 项目的矩形区域 | Rectangle area of the item

ParamTypeDescription
indexnumber项目索引

window_Selectable.itemRectForText(index) ⇒ Rectangle

获取文本项目的矩形区域
Gets the rectangle area for a text item

Kind: instance method of Window_Selectable
Returns: Rectangle - 文本项目的矩形区域 | Rectangle area of the text item

ParamTypeDescription
indexnumber项目索引

window_Selectable.setHelpWindow(helpWindow)

设置帮助窗口
Sets the help window

Kind: instance method of Window_Selectable

ParamTypeDescription
helpWindowWindow_Help帮助窗口

window_Selectable.showHelpWindow()

显示帮助窗口
Shows the help window

Kind: instance method of Window_Selectable


window_Selectable.hideHelpWindow()

隐藏帮助窗口
Hides the help window

Kind: instance method of Window_Selectable


window_Selectable.setHandler(symbol, method)

设置处理者
Sets a handler for a symbol

Kind: instance method of Window_Selectable

ParamTypeDescription
symbolstring符号标识
methodfunction处理方法

window_Selectable.isHandled(symbol) ⇒ boolean

判断是否有处理者
Checks if a handler exists for a symbol

Kind: instance method of Window_Selectable
Returns: boolean - 是否有处理者 | Whether a handler exists

ParamTypeDescription
symbolstring符号标识

window_Selectable.callHandler(symbol)

调用处理者
Calls the handler for a symbol

Kind: instance method of Window_Selectable

ParamTypeDescription
symbolstring符号标识

window_Selectable.isOpenAndActive() ⇒ boolean

判断窗口是否打开并且激活
Checks if the window is open and active

Kind: instance method of Window_Selectable
Returns: boolean - 是否打开并且激活 | Whether the window is open and active


window_Selectable.isCursorMovable() ⇒ boolean

判断光标是否可移动
Checks if the cursor is movable

Kind: instance method of Window_Selectable
Returns: boolean - 光标是否可移动 | Whether the cursor is movable


window_Selectable.cursorDown(wrap)

光标向下移动
Moves the cursor down

Kind: instance method of Window_Selectable

ParamTypeDescription
wrapboolean是否循环

window_Selectable.cursorUp(wrap)

光标向上移动
Moves the cursor up

Kind: instance method of Window_Selectable

ParamTypeDescription
wrapboolean是否循环

window_Selectable.cursorRight(wrap)

光标向右移动
Moves the cursor right

Kind: instance method of Window_Selectable

ParamTypeDescription
wrapboolean是否循环

window_Selectable.cursorLeft(wrap)

光标向左移动
Moves the cursor left

Kind: instance method of Window_Selectable

ParamTypeDescription
wrapboolean是否循环

window_Selectable.cursorPagedown()

光标下翻页
Moves the cursor page down

Kind: instance method of Window_Selectable


window_Selectable.cursorPageup()

光标上翻页
Moves the cursor page up

Kind: instance method of Window_Selectable


window_Selectable.scrollDown()

向下滚动
Scrolls down

Kind: instance method of Window_Selectable


window_Selectable.scrollUp()

向上滚动
Scrolls up

Kind: instance method of Window_Selectable


window_Selectable.update()

更新窗口
Updates the window

Kind: instance method of Window_Selectable


window_Selectable.updateArrows()

更新箭头
Updates the arrows

Kind: instance method of Window_Selectable


window_Selectable.processCursorMove()

处理光标移动
Processes cursor movement

Kind: instance method of Window_Selectable


window_Selectable.processHandling()

处理输入
Processes input handling

Kind: instance method of Window_Selectable


window_Selectable.processWheel()

处理鼠标滚轮
Processes mouse wheel input

Kind: instance method of Window_Selectable


window_Selectable.processTouch()

处理触摸输入
Processes touch input

Kind: instance method of Window_Selectable


window_Selectable.isTouchedInsideFrame() ⇒ boolean

判断触摸是否在窗口内部
Checks if touch is inside the window frame

Kind: instance method of Window_Selectable
Returns: boolean - 是否在内部 | Whether the touch is inside


window_Selectable.onTouch(triggered)

处理触摸事件
Handles touch events

Kind: instance method of Window_Selectable

ParamTypeDescription
triggeredboolean是否为触发状态

window_Selectable.hitTest(x, y) ⇒ number

命中测试
判断点是在哪个项目的矩形区域内,返回该项目索引。
Hit test
Determines which item's rectangle area the point is in, returns that item's index.

Kind: instance method of Window_Selectable
Returns: number - 项目索引,-1表示没有命中 | Item index, -1 means no hit

ParamTypeDescription
xnumberx坐标
ynumbery坐标

window_Selectable.isContentsArea(x, y) ⇒ boolean

判断是否为内容区域
Checks if the coordinates are in the content area

Kind: instance method of Window_Selectable
Returns: boolean - 是否为内容区域 | Whether it's the content area

ParamTypeDescription
xnumberx坐标
ynumbery坐标

window_Selectable.isTouchOkEnabled() ⇒ boolean

判断触摸确定是否启用
Checks if touch OK is enabled

Kind: instance method of Window_Selectable
Returns: boolean - 是否启用 | Whether it's enabled


window_Selectable.isOkEnabled() ⇒ boolean

判断确定按钮是否启用
Checks if OK button is enabled

Kind: instance method of Window_Selectable
Returns: boolean - 是否启用 | Whether it's enabled


window_Selectable.isCancelEnabled() ⇒ boolean

判断取消按钮是否启用
Checks if cancel button is enabled

Kind: instance method of Window_Selectable
Returns: boolean - 是否启用 | Whether it's enabled


window_Selectable.isOkTriggered() ⇒ boolean

判断确定按钮是否触发
Checks if OK button is triggered

Kind: instance method of Window_Selectable
Returns: boolean - 是否触发 | Whether it's triggered


window_Selectable.isCancelTriggered() ⇒ boolean

判断取消按钮是否触发
Checks if cancel button is triggered

Kind: instance method of Window_Selectable
Returns: boolean - 是否触发 | Whether it's triggered


window_Selectable.processOk()

处理确定操作
Processes OK operation

Kind: instance method of Window_Selectable


window_Selectable.playOkSound()

播放确定音效
Plays OK sound

Kind: instance method of Window_Selectable


window_Selectable.playBuzzerSound()

播放蜂鸣器音效
Plays buzzer sound

Kind: instance method of Window_Selectable


window_Selectable.callOkHandler()

调用确定处理者
Calls OK handler

Kind: instance method of Window_Selectable


window_Selectable.processCancel()

处理取消操作
Processes cancel operation

Kind: instance method of Window_Selectable


window_Selectable.callCancelHandler()

调用取消处理者
Calls cancel handler

Kind: instance method of Window_Selectable


window_Selectable.processPageup()

处理上翻页操作
Processes page up operation

Kind: instance method of Window_Selectable


window_Selectable.processPagedown()

处理下翻页操作
Processes page down operation

Kind: instance method of Window_Selectable


window_Selectable.updateInputData()

更新输入数据
Updates input data

Kind: instance method of Window_Selectable


window_Selectable.updateCursor()

更新光标
Updates the cursor

Kind: instance method of Window_Selectable


window_Selectable.isCursorVisible() ⇒ boolean

判断光标是否可见
Checks if the cursor is visible

Kind: instance method of Window_Selectable
Returns: boolean - 光标是否可见 | Whether the cursor is visible


window_Selectable.ensureCursorVisible()

确保光标可见
Ensures the cursor is visible

Kind: instance method of Window_Selectable


window_Selectable.callUpdateHelp()

调用更新帮助
Calls update help

Kind: instance method of Window_Selectable


window_Selectable.updateHelp()

更新帮助信息
Updates help information

Kind: instance method of Window_Selectable


window_Selectable.setHelpWindowItem(item)

设置帮助窗口项目
Sets help window item

Kind: instance method of Window_Selectable

ParamTypeDescription
itemobject项目对象

window_Selectable.isCurrentItemEnabled() ⇒ boolean

判断当前项目是否启用
Checks if the current item is enabled

Kind: instance method of Window_Selectable
Returns: boolean - 当前项目是否启用 | Whether the current item is enabled


window_Selectable.drawAllItems()

绘制所有项目
Draws all items

Kind: instance method of Window_Selectable


window_Selectable.drawItem(index)

绘制指定项目
Draws a specific item (abstract method)

Kind: instance method of Window_Selectable

ParamTypeDescription
indexnumber项目索引

window_Selectable.clearItem(index)

清除指定项目
Clears a specific item

Kind: instance method of Window_Selectable

ParamTypeDescription
indexnumber项目索引

window_Selectable.redrawItem(index)

重绘指定项目
Redraws a specific item

Kind: instance method of Window_Selectable

ParamTypeDescription
indexnumber项目索引

window_Selectable.redrawCurrentItem()

重绘当前项目
Redraws the current item

Kind: instance method of Window_Selectable


window_Selectable.refresh()

刷新窗口
Refreshes the window

Kind: instance method of Window_Selectable


贡献者

暂无相关贡献者

页面历史

暂无最近变更历史
最近更新