Tabs :D
This commit is contained in:
parent
a0f74457b3
commit
8b9ea9d0e8
@ -28,6 +28,7 @@ public class Main extends Application {
|
|||||||
private Button exit, min, Home_btn, Modpack_btn; // Define buttons
|
private Button exit, min, Home_btn, Modpack_btn; // Define buttons
|
||||||
private Rectangle dragBar; // Draggable top bar
|
private Rectangle dragBar; // Draggable top bar
|
||||||
private Pane root, tab;
|
private Pane root, tab;
|
||||||
|
private Tabs activeTab = Tabs.Home;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws Exception{
|
public void start(Stage primaryStage) throws Exception{
|
||||||
@ -51,6 +52,8 @@ public class Main extends Application {
|
|||||||
// Infrastructural navigation
|
// Infrastructural navigation
|
||||||
exit.setOnMouseClicked(event -> primaryStage.close());
|
exit.setOnMouseClicked(event -> primaryStage.close());
|
||||||
min.setOnMouseClicked(event -> primaryStage.setIconified(true));
|
min.setOnMouseClicked(event -> primaryStage.setIconified(true));
|
||||||
|
Home_btn.setOnMouseClicked(event -> { if(activeTab!=Tabs.Home) (activeTab=Tabs.Home).switchTab(tab); });
|
||||||
|
Modpack_btn.setOnMouseClicked(event -> { if(activeTab!=Tabs.Modpacks) (activeTab=Tabs.Modpacks).switchTab(tab); });
|
||||||
|
|
||||||
// Drag
|
// Drag
|
||||||
dragBar.setOnMousePressed(event -> {
|
dragBar.setOnMousePressed(event -> {
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.ColorPicker?>
|
||||||
|
|
||||||
|
|
||||||
|
<ColorPicker xmlns="http://javafx.com/javafx/8.0.102" xmlns:fx="http://javafx.com/fxml/1" />
|
Loading…
x
Reference in New Issue
Block a user