File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
resources/edu/wpi/grip/ui Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 11package edu .wpi .grip .ui ;
22
3+ import javafx .event .ActionEvent ;
34import javafx .fxml .FXML ;
45import javafx .scene .text .Text ;
56
@@ -8,6 +9,16 @@ public class AboutDialogController {
89 @ FXML
910 private Text versionNumberText ;
1011
12+ @ FXML
13+ void githubButtonAction (ActionEvent event ) {
14+ Main .getInstance ().getHostServices ().showDocument ("https://github.com/WPIRoboticsProjects/GRIP" );
15+ }
16+
17+ @ FXML
18+ void screenstepsButtonAction (ActionEvent event ) {
19+ Main .getInstance ().getHostServices ().showDocument ("http://wpilib.screenstepslive.com/s/4485/m/50711" );
20+ }
21+
1122 @ FXML
1223 void initialize () {
1324 assert versionNumberText != null : "fx:id=\" versionNumberText\" was not injected: check your FXML file 'AboutDialog.fxml'." ;
Original file line number Diff line number Diff line change 3535
3636public class Main extends Application {
3737
38+ private static Main instance ;
39+
3840 @ Inject private EventBus eventBus ;
3941 @ Inject private PipelineRunner pipelineRunner ;
4042 @ Inject private Project project ;
@@ -55,6 +57,15 @@ public static void main(String[] args) {
5557 launch (args );
5658 }
5759
60+ public static Main getInstance () {
61+ return instance ;
62+ }
63+
64+ public Main () {
65+ super ();
66+ instance = this ;
67+ }
68+
5869 @ Override
5970 @ SuppressWarnings ("PMD.SignatureDeclareThrowsException" )
6071 public void start (Stage stage ) throws Exception {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22
33<?import javafx .geometry.Insets?>
4+ <?import javafx .scene.control.Button?>
45<?import javafx .scene.image.Image?>
56<?import javafx .scene.image.ImageView?>
67<?import javafx .scene.layout.HBox?>
3334 <Font name =" Roboto Regular" size =" 14.0" />
3435 </font >
3536 </Text >
37+ <Pane VBox.vgrow=" ALWAYS" />
38+ <HBox >
39+ <children >
40+ <Button mnemonicParsing =" false" onAction =" #githubButtonAction" text =" Github..." >
41+ <font >
42+ <Font size =" 14.0" />
43+ </font >
44+ </Button >
45+ <Pane HBox.hgrow=" ALWAYS" />
46+ <Button mnemonicParsing =" false" onAction =" #screenstepsButtonAction" text =" ScreenSteps..." >
47+ <font >
48+ <Font name =" Roboto Regular" size =" 14.0" />
49+ </font >
50+ </Button >
51+ <Pane HBox.hgrow=" ALWAYS" />
52+ </children >
53+ </HBox >
3654 </children >
3755 </VBox >
3856 <Pane HBox.hgrow=" ALWAYS" />
You can’t perform that action at this time.
0 commit comments