Skip to content

Commit

Permalink
Add changelog details for #629
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceManiac authored and Cobrand committed Apr 30, 2017
1 parent faa9042 commit 1a0d7d8
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
```

0 comments on commit 1a0d7d8

Please sign in to comment.