fixed spinner editing and forced window size
This commit is contained in:
parent
cab0715248
commit
844a942267
3 changed files with 13 additions and 10 deletions
|
@ -15,6 +15,7 @@ class App : Application() {
|
|||
override fun start(stage: Stage) {
|
||||
var scene = Scene(loadFXML("primary"), 963.0, 713.0)
|
||||
stage.icons.add(Image(this.javaClass.getResourceAsStream("app-256x256.png")))
|
||||
stage.setResizable(false)
|
||||
stage.title = "Server For Dummies"
|
||||
stage.scene = scene
|
||||
stage.show()
|
||||
|
|
|
@ -412,7 +412,8 @@ class PrimaryController {
|
|||
private fun eulaDialog(): Boolean {
|
||||
var result = false
|
||||
val resources = this.javaClass.getResource("icons/warning.png")
|
||||
val dialog = Stage();
|
||||
val dialog = Stage()
|
||||
dialog.setResizable(false)
|
||||
dialog.initModality(Modality.APPLICATION_MODAL);
|
||||
dialog.title = directory
|
||||
val scenePane = Pane()
|
||||
|
@ -470,7 +471,8 @@ class PrimaryController {
|
|||
private fun createDialog(type: String, msg: String, yes: String, no: String, hold: Boolean): Boolean {
|
||||
var result = false
|
||||
val resources = this.javaClass.getResource("icons/$type.png")
|
||||
val dialog = Stage();
|
||||
val dialog = Stage()
|
||||
dialog.setResizable(false)
|
||||
dialog.initModality(Modality.APPLICATION_MODAL);
|
||||
dialog.title = directory
|
||||
val scenePane = Pane()
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
<Insets bottom="5.0" left="5.0" right="5.0" top="6.0" />
|
||||
</HBox.margin>
|
||||
</Label>
|
||||
<Spinner fx:id="portSpinner" onInputMethodTextChanged="#onPortChange" prefHeight="23.0" prefWidth="112.0">
|
||||
<Spinner fx:id="portSpinner" editable="true" onInputMethodTextChanged="#onPortChange" prefHeight="23.0" prefWidth="112.0">
|
||||
<HBox.margin>
|
||||
<Insets top="2.0" />
|
||||
</HBox.margin>
|
||||
|
@ -128,13 +128,13 @@
|
|||
<CheckBox fx:id="structuresCheckbox" alignment="TOP_LEFT" layoutX="14.0" layoutY="70.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" prefHeight="45.0" prefWidth="231.0" selected="true" text="Generate Structures (such as villages and strongholds)" />
|
||||
<CheckBox fx:id="pvpCheckbox" layoutX="14.0" layoutY="109.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" selected="true" text="Allow PvP" />
|
||||
<CheckBox fx:id="whitelistCheckbox" alignment="TOP_LEFT" layoutX="14.0" layoutY="138.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" prefHeight="45.0" prefWidth="231.0" text="Enable Whitelist (Only users you specify can join)" />
|
||||
<Spinner fx:id="maxPlayerSpinner" layoutX="130.0" layoutY="179.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<Spinner fx:id="maxPlayerSpinner" editable="true" layoutX="130.0" layoutY="179.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<valueFactory>
|
||||
<SpinnerValueFactory.IntegerSpinnerValueFactory amountToStepBy="1" initialValue="20" max="1000" min="0" />
|
||||
</valueFactory>
|
||||
</Spinner>
|
||||
<Label layoutX="14.0" layoutY="183.0" text="Maximum Players:" />
|
||||
<Spinner fx:id="maxSizeSpinner" layoutX="214.0" layoutY="212.0" prefHeight="23.0" prefWidth="155.0">
|
||||
<Spinner fx:id="maxSizeSpinner" editable="true" layoutX="214.0" layoutY="212.0" prefHeight="23.0" prefWidth="155.0">
|
||||
<valueFactory>
|
||||
<SpinnerValueFactory.IntegerSpinnerValueFactory amountToStepBy="1" initialValue="29999984" max="29999984" min="1" />
|
||||
</valueFactory>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<children>
|
||||
<CheckBox fx:id="cmdBlocksCheckbox" layoutX="14.0" layoutY="14.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" text="Enable Command Blocks" />
|
||||
<CheckBox fx:id="playerCountCheckbox" layoutX="14.0" layoutY="41.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" text="Hide Online Player Count" />
|
||||
<Spinner fx:id="memorySpinner" layoutX="154.0" layoutY="69.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<Spinner fx:id="memorySpinner" editable="true" layoutX="154.0" layoutY="69.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<valueFactory>
|
||||
<SpinnerValueFactory.IntegerSpinnerValueFactory amountToStepBy="1" initialValue="1024" max="65536" min="512" />
|
||||
</valueFactory>
|
||||
|
@ -160,7 +160,7 @@
|
|||
<Tooltip text="This is the amount of RAM that will get passed to Minecraft/the JVM. For simple servers, 1024 MB will be plenty. If you typically have more than 5 concurrent players, consider allocating more." />
|
||||
</tooltip>
|
||||
</Label>
|
||||
<Spinner fx:id="spawnSpinner" layoutX="172.0" layoutY="100.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<Spinner fx:id="spawnSpinner" editable="true" layoutX="172.0" layoutY="100.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<valueFactory>
|
||||
<SpinnerValueFactory.IntegerSpinnerValueFactory amountToStepBy="1" initialValue="16" max="29999984" min="0" />
|
||||
</valueFactory>
|
||||
|
@ -170,7 +170,7 @@
|
|||
<Tooltip text="All blocks in a radius from 0,~,0 will be unbreakable. If you want to break blocks within spawn, change this value." />
|
||||
</tooltip>
|
||||
</Label>
|
||||
<Spinner fx:id="simulationSpinner" layoutX="147.0" layoutY="132.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<Spinner fx:id="simulationSpinner" editable="true" layoutX="147.0" layoutY="132.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<valueFactory>
|
||||
<SpinnerValueFactory.IntegerSpinnerValueFactory amountToStepBy="1" initialValue="10" max="40" min="0" />
|
||||
</valueFactory>
|
||||
|
@ -180,7 +180,7 @@
|
|||
<Tooltip text="The radius of chunks for each player where ticks will be updated. In other words, anything outside these circles, such as furnaces, mobs, etc, will not be updated or simulated." />
|
||||
</tooltip>
|
||||
</Label>
|
||||
<Spinner fx:id="renderSpinner" layoutX="124.0" layoutY="165.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<Spinner fx:id="renderSpinner" editable="true" layoutX="124.0" layoutY="165.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<valueFactory>
|
||||
<SpinnerValueFactory.IntegerSpinnerValueFactory amountToStepBy="1" initialValue="10" max="40" min="2" />
|
||||
</valueFactory>
|
||||
|
@ -195,7 +195,7 @@
|
|||
<Tooltip text="If the server cannot update ticks (i.e. "lags") for longer than this amount of time, the server will shutdown. 60000 ms (60 seconds) is the default." />
|
||||
</tooltip>
|
||||
</Label>
|
||||
<Spinner fx:id="maxTickSpinner" layoutX="246.0" layoutY="199.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<Spinner fx:id="maxTickSpinner" editable="true" layoutX="246.0" layoutY="199.0" prefHeight="23.0" prefWidth="99.0">
|
||||
<valueFactory>
|
||||
<SpinnerValueFactory.IntegerSpinnerValueFactory amountToStepBy="1" initialValue="60000" max="180000" min="10000" />
|
||||
</valueFactory>
|
||||
|
|
Loading…
Add table
Reference in a new issue