Skip to content

offalynne/InputPlugin-Text

Repository files navigation

Text Input Plug-in

Cross platform player text entry for Input for GameMaker 2024.8

Supported Platforms

  • Desktop native (Windows, MacOS, Linux)
  • Mobile (Android, iOS, iPadOS, tvOS)
  • Console (Xbox, PlayStation, Switch)
  • Steam Deck

Direct Functions

Direct functions return per-frame momentary keyboard input. Best used on desktop platforms: no handling of mobile or console onscreen keyboard UI.

InputTextApplyDelta(string) // Returns string. Transform string with keyboard input
InputTextGetCharsRemoved()  // Returns number, removed characters 
InputTextGetDelta()         // Returns string, added text

Request Functions

Request functions use continuous context for a prompt, define a callback method for multi-modal text entry, and open an onscreen keyboard if necessary. Requests are ideal for cross-platform text entry including mobile and console.

InputTextRequestStart( // Returns boolean, success status. Show keyboard, start request
  caption,             // String, onscreen prompt
  initialText,         // String, initial text
  maxLength,           // Number, maximum character count between 1 and 256
  callback,            // Method, called upon status change
  [keyboardType]       // Constant, keyboard type. Default kbv_type_default
  [filterProfanity])   // Boolean, whether to filter profanity. Default true on Switch only

InputTextRequestStop()         // Returns undefined. Stop last request
InputTextRequestGetString()    // Returns string, text entered last request
InputTextRequestGetStatus()    // Returns enum, status of last request
InputTextRequestGetProfanity() // Returns boolean, whether last request was filtered

enum INPUT_TEXT_REQUEST_STATUS
  .NONE       // No requests made
  .WAITING    // Awaiting outcome
  .STOPPED    // Request stopped 
  .CANCELLED  // Player cancelled
  .CONFIRMED  // Player confirmed

About

Cross platform player text entry Input Plug-in for GameMaker 2024.8

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors