0.0.6
Pre-releaseNew Keyboard Layout Translators
If you develop with a non-qwerty layout you can now express buttons in your layout
This is helpful for collaboration with international coworkers
// Default is qwerty
input.keyboard.button("w").isPressed
// New Translators
input.keyboard.button(.qwerty("w")).isPressed
input.keyboard.button(.qwertz("w")).isPressed
input.keyboard.button(.azerty("z")).isPressed
CharacterStream
Capture intended keyboard inputs in real time. When capturing, the stream will build a string out of user inputs for end user reading.
The string property will automatically be modified like a text editor, including backspace, delete, and arrow keys.
No need to attempt to parse keyboard inputs.
// Create a stream and capture keyboard input
let stream = CharacterStream()
stream.startCapture()
// Add the stream to a renderable text object
text.string = stream.string
Any Keys
You can ask for a keyboard button state that matches any kind of that key
let any1Pressed = keyboard.button(.number(1, .anyVariation)).isPressed
let topRow1Pressed = keyboard.button(.number(1, .standard)).isPressed
let numberPad1Pressed = keyboard.button(.number(1, .numberPad)).isPressed
Keyboard Audit
Windows, macOS, Linux, iOS, tvOS, and HTML5 are now standardized for keyboard input with full size keyboards.
Platform API
Game.platform now represents the current platform with a checkable type.
Platforms now have access to resource checking and loading APIs
func locateResource(from path: String) async -> String?
func loadResource(from path: String) async throws -> Data
These are a prerequisite for the upcoming custom file loaders feature.
Linux
Linux rendering is now functional. Linux has many more features needed but is making rapid progress.