Created
August 20, 2022 19:24
-
-
Save NotArchon/95a0b35d4f6fbad67a3a41722600be5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.discrypto.client.screens.main; | |
import com.discrypto.client.Client; | |
import com.discrypto.client.scenes.StrategyScene; | |
import com.discrypto.client.screens.Screen; | |
import javafx.scene.input.MouseButton; | |
import javafx.stage.Modality; | |
public class StrategyScreen extends Screen<StrategyScene> { | |
public final StrategyListScreen listScreen; | |
public StrategyScreen(StrategyListScreen listScreen) { | |
super( | |
"Discrpyto Trading Bot | Viewing Strategy", | |
"strategy", | |
new StrategyScene() | |
); | |
this.listScreen = listScreen; | |
} | |
@Override | |
public void beforeShow() { | |
stage.setResizable(false); | |
stage.initOwner(listScreen.stage); | |
stage.initModality(Modality.APPLICATION_MODAL); | |
//stage.setOnCloseRequest(e -> listScreen.controller.pane.setDisable(false)); | |
//listScreen.controller.pane.setDisable(true); | |
listScreen.stage.hide(); | |
stage.setOnCloseRequest(e -> listScreen.stage.show()); | |
} | |
@Override | |
public void afterShow() { | |
controller.backtest_button.setOnMouseClicked(e -> { | |
if(e.getButton() == MouseButton.PRIMARY) | |
Client.openScreen(new StrategyBacktestScreen(this)); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment