Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl From<i32> for WindowPos #966

Closed
anyputer opened this issue Feb 2, 2020 · 1 comment
Closed

impl From<i32> for WindowPos #966

anyputer opened this issue Feb 2, 2020 · 1 comment

Comments

@anyputer
Copy link

anyputer commented Feb 2, 2020

This would simplify moving a window to a position.

Example:

use sdl2::video::WindowPos::Positioned;

// assume a window has been initialized

let num = 42;

window.set_position(WindowPos::Positioned(num), WindowPos::Positioned(num));
// could be written as
window.set_position(num.into(), num.into());
@TheRadioGuy
Copy link
Contributor

@Cobrand please close the issue

@Cobrand Cobrand closed this as completed May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants