Skip to content

Commit

Permalink
Disallow setting UI scale after GUI has been initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
FeldrinH committed Sep 25, 2023
1 parent f59f964 commit c97d860
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/ee/ut/dendroloj/Dendrologist.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ private Dendrologist() {
* Default: {@code 1.0}
*/
public static void setUIScale(double uiScale) {
if (awake) {
throw new IllegalStateException("Cannot set UI scale after dendrologist has woken up");
}
Dendrologist.uiScale = uiScale;
}

Expand Down

0 comments on commit c97d860

Please sign in to comment.