Releases: VincentFoulon80/console_engine
Releases · VincentFoulon80/console_engine
v2.6.1
v2.6.0
2.5.1
2.5.0
2.4.0
🆕 Features
- New feature :
form
This feature allow the creation of forms that can handle multiple fields simultaneously, with optional validation of your choice
(Thanks to @LoipesMas for reviewing the feature!) - Available Fields:
- Text
- HiddenText
- Checkbox
- Radio
- Available Validation constraints:
- NotBlank
- IsTrue
- Integer
- Number
- Alphabetic
- Alphanumeric
- Not
- AnyOf
- AllOf
- Callback
- CharactersCallback
- Examples:
- form-text : Example usage of a
Text
FormField (most basic use of a field) - form-simple : Example creation and usage of a
Form
containing two inputs - form-choices : Example usage of a
Checkbox
andRadio
FormFields - form-validation : Example usage of Form Validation constraints
- form-text : Example usage of a
BorderStyle
:- Added a
new_solid
function, that creates a border with only the block character from ascii - Added a
with_colors
on existing borders, that changes the foreground and background colors of the borders
- Added a
Event
:Event
now has the Debug, Clone and Copy trait
🐞 Bugfixes
- Removed a trailing
unwrap
fromScreen::draw()
2.3.0
2.2.0
2.1.0
🆕 Additions
- A new
event
feature is now available (don't forget to enable that feature first!):engine.poll()
will allow you to implement console_engine as an event system (see 'events' Example)poll()
can send you multiple kind of events:Event::Frame
: A frame has arrived, you should start drawing it (or not if you're not interested)Event::Key(KeyEvent)
: A key has been pressed, use theKeyEvent
to find out which key and which modifier (Ctrl, Shift, ...) has been pressedEvent::Mouse(MouseEvent)
: The mouse has moved, or clicked. Use theMouseEvent
to find out what happened, at which position and if a modifier (Ctrl, Shift, ...) has been pressed as wellEvent::Resize(u16, u16)
: The window has been resized. You can figure out the new size with its two parameters.
- Note: While using
poll()
, unlike withwait_frame()
, you'll have to figure out yourself if a key has been pressed, held or released.
🐞 Bugfixes
- Fixed a bug when using some special characters that the
unicode_width
crate don't recognize, leading to a panic.
2.0.2
2.0.1
🆕 Additions
- A new function
rect_border()
allow you to draw rectangles with styled border (useful for box-drawing symbols). (@LaineZ) - A new enum
BorderStyle
with some preset borders but also anew
function to allow you to use any character you want to make borders (@LaineZ) - Example
styled-rect
to showcase the newrect_border
(@LaineZ)
💥 Breaking Changes
- Initialization of ConsoleEngine now returns a
Result
so he won't panic out of your control. Just add.unwrap()
if you don't care.
🧰 Dependency Updates
- Updating crossterm from
0.19
to0.20