Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Kitty committed Jan 5, 2024
1 parent 2fe42a4 commit 8970b91
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.gtohelper.datafetcher.controllers;

import javafx.event.ActionEvent;

import java.awt.*;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

public class AnalyzeResultsController {

public void onHyperlinkClick(ActionEvent mouseEvent) throws URISyntaxException, IOException {
Desktop.getDesktop().browse(new URI("www.patreon.com/gtohelper"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public class GTOHelperController {
@FXML
HandAnalysisController handAnalysisController;

@FXML
AnalyzeResultsController analyzeResultsController;

@FXML
WorkQueueController workQueueController;

Expand All @@ -39,6 +42,7 @@ public class GTOHelperController {

@FXML
TabPane mainTabPain;
@FXML Tab analyseResultsTab;
@FXML Tab handAnalysisTab;
@FXML Tab workQueueTab;
@FXML Tab dbConnectionTab;
Expand Down Expand Up @@ -166,6 +170,7 @@ private Work buildWork(List<HandData> hands, Work.WorkSettings settings) {

private void initializeControls() {
// Listener for when different tabs are selected.
mainTabPain.getSelectionModel().select(workQueueTab);
mainTabPain.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
@Override
public void changed(ObservableValue<? extends Tab> observable, Tab oldValue, Tab newValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private void setNewSolveStateFields(SolveTask task) {

viewHandReplay(task.getHandData().id_hand);
});
viewInBrowser.disableProperty().set(false);
//viewInBrowser.disableProperty().set(false);

//viewHandReplay

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ void loadFieldsFromModel() {

savedBetSettingsTable.getItems().clear();
savedBetSettingsTable.getItems().addAll(settingNameToTreeData);
savedBetSettingsTable.getSelectionModel().select(0);

callback.accept(Arrays.asList(listOfSettingsNames.split(",")));
}
Expand Down
19 changes: 19 additions & 0 deletions src/main/resources/com/gtohelper/fxml/AnalyzeResults.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Text?>

<AnchorPane xmlns="http://javafx.com/javafx/20.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.gtohelper.datafetcher.controllers.AnalyzeResultsController">
<opaqueInsets>
<Insets />
</opaqueInsets>
<children>
<Text layoutX="-80.0" layoutY="-77.0" strokeType="OUTSIDE" strokeWidth="0.0" text="This tab is a work in progress, to be released through the GTOHelper Patreon for version 0.1.1" textAlignment="CENTER" wrappingWidth="333.13671875" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
<Hyperlink onAction="#onHyperlinkClick" text="patreon.com/GTOHelper" AnchorPane.leftAnchor="96.0" AnchorPane.topAnchor="40.0" />
</children>
<padding>
<Insets left="30.0" top="100.0" />
</padding>
</AnchorPane>
15 changes: 10 additions & 5 deletions src/main/resources/com/gtohelper/fxml/GTOHelper.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,26 @@
<children>
<TabPane fx:id="mainTabPain" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" tabClosingPolicy="UNAVAILABLE">
<tabs>
<Tab fx:id="workQueueTab" id="workQueueTab" text="Work Queue">
<Tab fx:id="analyseResultsTab" id="analyzeResultsTab" text="Analyze Results">
<content>
<fx:include fx:id="workQueue" source="WorkQueue.fxml"/>
<fx:include fx:id="analyzeResults" source="AnalyzeResults.fxml"/>
</content>
</Tab>
<Tab fx:id="solverSettingsTab" id="solverSettingsTab" text="Solver Settings">
<Tab fx:id="workQueueTab" id="workQueueTab" text="Work Queue">
<content>
<fx:include fx:id="solverSettings" source="SolverSettings.fxml"/>
<fx:include fx:id="workQueue" source="WorkQueue.fxml"/>
</content>
</Tab>
<Tab fx:id="handAnalysisTab" id="handAnalysisTab" text="Hand Analysis" >
<Tab fx:id="handAnalysisTab" id="handAnalysisTab" text="Build Work" >
<content>
<fx:include fx:id="handAnalysis" source="HandAnalysis.fxml" />
</content>
</Tab>
<Tab fx:id="solverSettingsTab" id="solverSettingsTab" text="Solver Settings">
<content>
<fx:include fx:id="solverSettings" source="SolverSettings.fxml"/>
</content>
</Tab>
<Tab fx:id="dbConnectionTab" id="dbConnectionTab" text="DB Connection">
<content>
<fx:include fx:id="dbConnection" source="DBConnection.fxml"/>
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/com/gtohelper/fxml/HandAnalysis.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@
</AnchorPane>
<AnchorPane GridPane.columnIndex="1" GridPane.rowIndex="1">
<children>
<Label alignment="CENTER" text="Tournament support is very &quot;in alpha&quot;." textAlignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label alignment="CENTER" text="Full Tournament support is set for v0.1.2" textAlignment="CENTER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
</children>
</AnchorPane>
<AnchorPane GridPane.columnIndex="1" GridPane.rowIndex="3">
<children>
<Label alignment="CENTER" prefHeight="36.0" prefWidth="360.0" text="Default ranges are 100bb. If modified, *please* backup your config file at .\out\production\GTOHelper\config.properties" textAlignment="CENTER" wrapText="true" AnchorPane.bottomAnchor="7.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Label alignment="CENTER" prefHeight="36.0" prefWidth="360.0" text="Until then, only solving with the Default 100bb range is possible." textAlignment="CENTER" wrapText="true" AnchorPane.bottomAnchor="7.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
</children>
</AnchorPane>
</children>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/com/gtohelper/fxml/OtherSettings.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<Insets left="5.0" right="15.0" />
</padding>
</RadioButton>
<RadioButton fx:id="solverV2Radio" mnemonicParsing="false" text="Solver V2" />
<RadioButton fx:id="solverV2Radio" mnemonicParsing="false" text="Solver V2 or V3" />
</children>
</HBox>
</children>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/com/gtohelper/fxml/WorkQueue.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
</HBox>
<HBox>
<children>
<Hyperlink fx:id="viewInBrowser" disable="true" graphicTextGap="0.0" text="Click to replay hand in browser" HBox.hgrow="ALWAYS">
<Hyperlink fx:id="viewInBrowser" disable="true" graphicTextGap="0.0" text="Click to replay hand PT4 (v0.1.4)" HBox.hgrow="ALWAYS">
<opaqueInsets>
<Insets />
</opaqueInsets>
Expand Down

0 comments on commit 8970b91

Please sign in to comment.