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

Make help window draggable #53

Merged

Conversation

itsnotsherm
Copy link

close #51

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/main/java/seedu/address/ui/HelpWindow.java 0.00% 10 Missing ⚠️
Files with missing lines Coverage Δ Complexity Δ
src/main/java/seedu/address/ui/HelpWindow.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

Comment on lines +62 to +71

// Make the window draggable
getRoot().getScene().setOnMousePressed(event -> {
xOffset = event.getSceneX();
yOffset = event.getSceneY();
});
getRoot().getScene().setOnMouseDragged(event -> {
getRoot().setX(event.getScreenX() - xOffset);
getRoot().setY(event.getScreenY() - yOffset);
});

Choose a reason for hiding this comment

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

LGTM! simple and effective implementation.

@itsnotsherm itsnotsherm merged commit 4c2eb29 into AY2425S1-CS2103T-W11-1a:master Oct 17, 2024
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

Fix help window
2 participants