Skip to content

Commit

Permalink
Document why Screens can't be moved
Browse files Browse the repository at this point in the history
  • Loading branch information
nightm4re94 committed Dec 7, 2024
1 parent c571fc6 commit 5ac7732
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,23 @@ protected Screen(final String screenName) {
super(0, 0);
this.setName(screenName);
}

/**
* Overrides the setX method from GuiComponent to prevent changing the x-coordinate.
* This method does nothing because screens always start at the coordinates (0, 0).
*
* @param x The new x-coordinate, which will be ignored.
*/
@Override
public void setX(final double x) {
// do nothing because screens always start at 0/0
}

/**
* Overrides the setY method from GuiComponent to prevent changing the y-coordinate.
* This method does nothing because screens always start at the coordinates (0, 0).
*
* @param y The new y-coordinate, which will be ignored.
*/
@Override
public void setY(final double y) {
// do nothing because screens always start at 0/0
Expand Down

0 comments on commit 5ac7732

Please sign in to comment.