mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
Add changelog details for #629
This commit is contained in:
+16
-1
@@ -20,4 +20,19 @@ surface.blit(None,Rect::new(5,5,5,5)); // instead of surface.blit(None,Some(Rect
|
||||
sdl2::hint::set_video_minimize_on_focus_lost(bool) -> bool;
|
||||
sdl2::hint::set_video_minimize_on_focus_lost_with_priority(bool, sdl2::hint::Hint) -> bool;
|
||||
sdl2::hint::get_video_minimize_on_focus_lost() -> bool;
|
||||
```
|
||||
```
|
||||
|
||||
[PR #629](https://github.com/AngryLawyer/rust-sdl2/pull/629)
|
||||
|
||||
* Breaking: Changed Color to be a struct rather than an enum.
|
||||
* Takes less space, easier to use, old constructors are still available.
|
||||
* Matching is no longer necessary to read the component values.
|
||||
* Struct rather than variant construction is required in static initializers.
|
||||
|
||||
```rust
|
||||
let color = Color { r: 255, g: 0, b: 0, a: 255 };
|
||||
let color = Color::RGBA(255, 0, 0, 255);
|
||||
let color = Color::RGB(255, 0, 0);
|
||||
let (r, g, b) = color.rgb();
|
||||
let (r, g, b, a) = color.rgba();
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user