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
TextFormField (most basic use of a field) - form-simple : Example creation and usage of a
Formcontaining two inputs - form-choices : Example usage of a
CheckboxandRadioFormFields - form-validation : Example usage of Form Validation constraints
- form-text : Example usage of a
BorderStyle:- Added a
new_solidfunction, that creates a border with only the block character from ascii - Added a
with_colorson existing borders, that changes the foreground and background colors of the borders
- Added a
Event:Eventnow has the Debug, Clone and Copy trait
🐞 Bugfixes
- Removed a trailing
unwrapfromScreen::draw()
2.3.0
2.2.0
2.1.0
🆕 Additions
- A new
eventfeature 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 theKeyEventto find out which key and which modifier (Ctrl, Shift, ...) has been pressedEvent::Mouse(MouseEvent): The mouse has moved, or clicked. Use theMouseEventto 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_widthcrate 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
BorderStylewith some preset borders but also anewfunction to allow you to use any character you want to make borders (@LaineZ) - Example
styled-rectto showcase the newrect_border(@LaineZ)
💥 Breaking Changes
- Initialization of ConsoleEngine now returns a
Resultso he won't panic out of your control. Just add.unwrap()if you don't care.
🧰 Dependency Updates
- Updating crossterm from
0.19to0.20