SpreadsheetInputSetup
Package: Libraries.Interface.Behaviors.Controls · Inherits from: Libraries.Language.Object
The SpreadsheetInputSetup class builds the input tables of spreadsheets: the "Spreadsheet" table, and the "SpreadsheetCellField" table of the field a cell is edited in, which starts as a copy of the "TextField" table. The keys follow Excel's, with Command in place of Control on a Mac where Excel for Mac uses it: - Arrows move; with Shift, they extend the selection. - Control (Command) with an arrow jumps to the edge of the data. - Home goes to the start of the row; Control-Home to the first cell and Control-End to the last cell with data. - Page Up and Page Down move a screen. - Tab and Shift-Tab move right and left; Enter and Shift-Enter down and up. - Control-Space selects the column, Shift-Space the row, Control-A everything. - F2 edits the cell; typing replaces its text. In the field, Enter, Tab, Shift-Enter and Shift-Tab keep the edit and move; Escape cancels it. - Delete and Backspace clear the selection. - Control-Plus adds rows or columns, Control-Minus removes them. - Control-Z undoes, Control-Y and Control-Shift-Z redo. - Control-C, Control-X and Control-V copy, cut and paste. - Shift-F10 opens the menu. The mouse and fingers select, drag, change column widths and open the menu, and the mouse wheel scrolls. DefaultInputSets:SetupSpreadsheetInput calls it when the game starts, so most users won't need to.
Example Code
use Libraries.Interface.Behaviors.Controls.SpreadsheetInputSetup
use Libraries.Game.GameStateManager
use Libraries.Game.GameInput
GameStateManager manager
GameInput gameInput = manager:GetInput()
SpreadsheetInputSetup setup
setup:Setup(gameInput)
Actions
Setup(Libraries.Game.GameInput gameInput)
This action builds both tables and adds them to the game's input. The "TextField" table must already be set up.
Parameters
gameInputLibraries.Game.GameInput: The game's input.