Add comment toggle feature
This commit is contained in:
@@ -9,6 +9,7 @@ import com.google.common.eventbus.Subscribe;
|
||||
|
||||
import app.events.ExitApplicationEvent;
|
||||
import app.events.LanguageChangedEvent;
|
||||
import app.events.ToggleCommentEvent;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
@@ -82,6 +83,10 @@ public class MenubarController implements Initializable, Controller {
|
||||
this.eventBus.register(this);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* FILE */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* Handles the event where the language was change from the menu.
|
||||
* @param event
|
||||
@@ -102,6 +107,15 @@ public class MenubarController implements Initializable, Controller {
|
||||
this.eventBus.post(new ExitApplicationEvent());
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* EDIT */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
@FXML
|
||||
private void handleToggleComment(ActionEvent event) {
|
||||
this.eventBus.post(new ToggleCommentEvent());
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates menubuttons whenever the language is changed
|
||||
* @param event
|
||||
@@ -117,4 +131,9 @@ public class MenubarController implements Initializable, Controller {
|
||||
.orElseThrow()
|
||||
.setSelected(true);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* ABOUT */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user