CalendarInputSetup

Package: Libraries.Interface.Behaviors.Controls · Inherits from: Libraries.Language.Object

The CalendarInputSetup builds the input tables of calendars and date fields, following the date picker of the WAI-ARIA Authoring Practices: "Calendar": Left and Right move the current day a day, Up and Down a week, Home and End to the first and last day of the week, Page Up and Page Down a month, and Shift with Page Up and Page Down a year. Enter, the number pad's Enter and Space choose the current day. A click or touch on a day chooses it, or moves to another month's day. The mouse moving onto and off the calendar marks and clears the day under it. "DateFieldCalendar": the same, for the calendar a DateField opens, plus Escape to close it. "DateField": the keys of a text field, plus Alt and Down to open the calendar, Alt and Up to close it, and Escape to close it. The game builds these tables when it starts, through DefaultInputSets:SetupCalendarInput, after the text field's table, which the date field's table copies.

Example Code

use Libraries.Interface.Behaviors.Controls.CalendarInputSetup

// The game calls Setup with its input when it starts.
CalendarInputSetup setup

Actions

Setup(Libraries.Game.GameInput gameInput)

This action adds the "Calendar", "DateFieldCalendar" and "DateField" input tables to the game's input.

Parameters

Example

use Libraries.Game.GameInput
use Libraries.Interface.Behaviors.Controls.CalendarInputSetup

action AddCalendarTables(GameInput gameInput)
    CalendarInputSetup setup
    setup:Setup(gameInput)
end

Inherited Actions

3 actions from Libraries.Language.Object