You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Layouting based on Flexbox and powered by stretch.
Built-in GUI widgets. Specifically: buttons, sliders, checkboxes, radio buttons, rows, and columns.
Built-in GUI renderer. It is capable of rendering all the built-in GUI widgets.
Customization. The ui::core module can be used to implement custom widgets and renderers.
Gamepad support. The input::Event enum now has a Gamepad variant. #29
Mesh support. The types Shape and Mesh have been introduced. Rectangles, circles, ellipses, and polylines can now be drawn with ease using fill or stroke modes. #50
The Game::LoadingScreen associated type. Given that all the Game associated types implement a trait with a load method, wiring a loading screen now is as simple as writing its name. Because of this, the Game::new method is no longer necessary and it is dropped. #35
Input trait. It allows to implement reusable input handlers. #35
KeyboardAndMouse input handler. Useful to quickstart development and have easy access to the keyboard and the mouse from the get-go. #35
CursorTaken and CursorReturned mouse input events. They are fired when the cursor is used/freed by the user interface. #35
Off-screen text rendering support. Font::draw now supports any Target instead of a window Frame. #25
Game::debug performance tracking. Time spent on this method is now shown in the built-in debug view. #26
Implementation of ParallelExtend for Batch. A Batch can now be populated using multiple threads, useful to improve performance when dealing with many thousands of quads. #37
Text alignment. It can be defined using the new HorizontalAlignment and VerticalAlignment types in the graphics module. #35
Font::measure. It allows to measure the dimensions of any Text. #35
Rectangle::contains. It returns whether or not a Rectangle contains a given Point. #35
Sprite::scale. It can be used to change the Sprite size when drawed.
Debug::ui_duration. It returns the average time spent running the UI runtime.
A counter example as an introduction to the new UI architecture. #35
A user interface example that introduces the different built-in widgets. #35
A gamepad example that displays the last gamepad event. #29
A mesh example that showcases the different ways to use the new Mesh and Shape types. #50
Multiple gravity centers based on mouse clicks in the particles example. #30
Changed
The Game::Input associated type now has to implement the new Input trait. This splits code quite nicely, as the on_input method moves away from Game. It also makes Input implementors reusable. For instance, a KeyboardAndMouse type has been implemented that can be used out of the box! #35
Game::draw now takes a Frame directly instead of a Window. #35
LoadingScreen::on_progress has been renamed to LoadingScreen::draw and it now receives a Frame instead of a Window. #35
input::Event is now split into four different variants representing input sources: Keyboard, Mouse, Gamepad, and Window. Each one of these sources has its own module inside input with an Event type where the old variants can be found. #29
input::KeyCode has been moved to input::keyboard::KeyCode. #29
input::MouseButton has been moved to input::mouse::Button. #29
Batch::draw and texture_array::Batch::draw do not take a position argument anymore. Using Target::transform before drawing is preferred. #53
Font::load has been renamed to Font::load_from_bytes for consistency. #55
The performance of the particles example has been improved considerably on all platforms. #37
The input example uses the new ui module now.
Removed
The Game::View associated type. Implementors of the Game trait are also meant to hold the game assets now. This simplifies the API considerably, and it helps model your game state-view relationship with precision, avoiding inconsistencies. #35