First options menu and a lot of fixes

This commit is contained in:
2020-07-19 20:02:54 +02:00
parent 6521ceeec7
commit 201fac09cc
16 changed files with 289 additions and 78 deletions

View File

@@ -3,11 +3,16 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.chart.LineChart?>
<?import javafx.scene.chart.NumberAxis?>
<?import javafx.scene.control.*?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<TabPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" tabClosingPolicy="UNAVAILABLE" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/9.0.1">
<TabPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" tabClosingPolicy="UNAVAILABLE" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1">
<tabs>
<Tab text="%game.balance.history">
<content>
@@ -15,7 +20,8 @@
<columns>
<TableColumn prefWidth="50.666626400416135" styleClass="align-right" text="%game.balance.history.index" />
<TableColumn editable="false" maxWidth="500.0" prefWidth="100.0" styleClass="align-right" text="%game.balance.history.change" />
<TableColumn maxWidth="1.7976931348623157E308" prefWidth="300.0" text="%game.balance.history.type" />
<TableColumn maxWidth="1.7976931348623157E308" prefWidth="207.0" text="%game.balance.history.type" />
<TableColumn prefWidth="161.0" text="%game.balance.history.product" />
</columns>
<placeholder>
<Label text="%game.balance.history.no-data" />

View File

@@ -1,10 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.control.ToolBar?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<VBox maxHeight="1.7976931348623157E308" minHeight="500.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<AnchorPane>
@@ -22,7 +32,16 @@
</Label>
</items>
</ToolBar>
<Button alignment="CENTER" mnemonicParsing="false" onMouseClicked="#scheduleStop" styleClass="red" text="%game.quit" textFill="WHITE" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="7.0" />
<HBox layoutX="710.5" layoutY="7.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="7.0">
<children>
<Button fx:id="optionsButton" mnemonicParsing="false" text="%menu.options">
<HBox.margin>
<Insets right="10.0" />
</HBox.margin>
</Button>
<Button alignment="CENTER" mnemonicParsing="false" onMouseClicked="#scheduleStop" styleClass="red" text="%game.quit" textFill="WHITE" />
</children>
</HBox>
</children>
</AnchorPane>
<SplitPane dividerPositions="0.3140277777777778" maxHeight="1.7976931348623157E308" VBox.vgrow="ALWAYS">

View File

@@ -11,6 +11,20 @@ Button.red:pressed {
-fx-background-color: #9c2121;
}
.toggle-button {
-fx-min-width: 50;
-fx-max-width: 50;
-fx-min-height: 20;
-fx-border-color: #aaaaaa;
-fx-border-radius: 5;
-fx-background-radius: 5;
-fx-background-color: linear-gradient(to right, white 40%, #999999 40%, #dddddd);
-fx-background-insets: 0;
}
.toggle-button:selected {
-fx-background-color: linear-gradient(to right, #1695e8, #1279bb 60%, white 60%);
}
ScrollPane {
-fx-background-insets: 0;
-fx-border-insets: 0;
@@ -34,6 +48,14 @@ Label.red {
Label.green {
-fx-text-fill: #457229;
}
.options-menu > Label {
-fx-font-size: 16;
}
.options-menu .heading {
-fx-padding: 10 0 0 0;
-fx-font-size: 20;
-fx-font-weight: bold;
}
.align-right {
-fx-alignment: center-right;

View File

@@ -1,5 +1,12 @@
test.hello-world = Hallo Welt!
menu.back = Zur\u00fcck
menu.options = Optionen
menu.options.general = Allgemein
menu.options.gameplay = Spielmechanik
menu.options.gameplay.quest-resolving = Erlauben Auftr\u00e4ge gegeneinander aufzul\u00f6sen
menu.options.gameplay.auto-quest-refill = Automatisch neue Auftr\u00e4ge akzeptieren
game.budget = Budget: %d\u20ac
game.quit = Spiel beenden
game.quests = Auftr\u00e4ge
@@ -21,6 +28,7 @@ game.balance.history.type.move = Produkt bewegt
game.balance.history.type.noop = NOOP
game.balance.history.type.deliver = Produkt ausgelagert
game.balance.history.type.store = Produkt eingelagert
game.balance.history.product = Produkt
game.balance.chart = Bilanz
game.balance.chart.line = Budget
game.balance.total-income = Gesamteinahmen: %d\u20ac

View File

@@ -1,5 +1,15 @@
test.hello-world = Hello World!
langs.en_us = English (America)
langs.de_de = Deutsch
menu.options = Options
menu.options.back = Apply & Leave
menu.options.general = General
menu.options.gameplay = Gameplay
menu.options.gameplay.quest-resolving = Allow quest resolving
menu.options.gameplay.auto-quest-refill = Automatically refill quests
game.budget = Budget: %d$
game.quit = Quit Game
game.quests = Quests
@@ -21,6 +31,7 @@ game.balance.history.type.move = Product moved
game.balance.history.type.noop = NOOP
game.balance.history.type.deliver = Product delivered
game.balance.history.type.store = Product stored
game.balance.history.product = Product
game.balance.chart = Balance
game.balance.chart.line = Budget
game.balance.total-income = Total Income: %d$