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

Split KeyboardAndMouse #69

Merged
merged 2 commits into from
Jul 11, 2019
Merged

Split KeyboardAndMouse #69

merged 2 commits into from
Jul 11, 2019

Conversation

DarkDrek
Copy link
Contributor

@DarkDrek DarkDrek commented Jul 9, 2019

Fixes #68

Keyboard and Mouse are now separate Input's

Keyboard and Mouse are now separate Input's
Copy link
Owner

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is beautiful! Gotta love nice and composable abstractions. Thank you again! 🎉

Just a small change before merge.

examples/mesh.rs Outdated
@@ -74,7 +74,7 @@ impl Game for Example {
fn interact(&mut self, input: &mut KeyboardAndMouse, _window: &mut Window) {
match self.shape {
ShapeOption::Polyline => {
self.polyline_points.extend(input.mouse_button_clicks(mouse::Button::Left));
self.polyline_points.extend(input.mouse().button_clicks(mouse::Button::Left));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simply change the Game::Input type to Mouse in this example.

@hecrj hecrj added the feature New feature or request label Jul 10, 2019
@hecrj hecrj added this to the 0.4.0 milestone Jul 10, 2019
@DarkDrek DarkDrek mentioned this pull request Jul 10, 2019
Copy link
Owner

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you again.

@hecrj hecrj merged commit 5245010 into hecrj:master Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split Keyboard and Mouse into Keyboard and Mouse structs
2 participants