Skip to content

Commit

Permalink
Fix: Replace loaders with new loadscene function
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Mar 13, 2026
1 parent bf10829 commit b655620
Showing 1 changed file with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,9 @@ public void setOrganization(Charity charity) {

/* EVENTS */
public void switchToCharityPage(ActionEvent event){
try {
FXMLLoader fxmlLoader =
new FXMLLoader(HmHApplication.class.getResource("/fxml/charityPage.fxml"));
Parent root = fxmlLoader.load();
CharityPageController controller = fxmlLoader.getController();
controller.setCharity(charity);

Stage stage = (Stage) ((Node)event.getSource()).getScene().getWindow();
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setFullScreen(true);
stage.show();
} catch (IOException e) {
throw new RuntimeException(e);
}
LoaderScene.LoadScene("CharityPage", event, charity);
}
public void switchToDonationPage(ActionEvent event){
CharityPageController.loadNewScene(event, charity);
LoaderScene.LoadScene("DonationPage", event, charity);
}
}

0 comments on commit b655620

Please sign in to comment.