Hide refresh and add button in MainPage
This commit is contained in:
@@ -356,7 +356,8 @@ public final class LauncherHelper {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case CLOSE:
|
case CLOSE:
|
||||||
throw new Error("Never come to here");
|
// Never come to here.
|
||||||
|
break;
|
||||||
case KEEP:
|
case KEEP:
|
||||||
// No operations here
|
// No operations here
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ public final class MainPage extends StackPane implements DecoratorPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadingVersions() {
|
private void loadingVersions() {
|
||||||
contentPane.getChildren().setAll(spinner);
|
getChildren().setAll(spinner);
|
||||||
FXUtils.resetChildren(masonryPane, Collections.emptyList());
|
FXUtils.resetChildren(masonryPane, Collections.emptyList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ public final class MainPage extends StackPane implements DecoratorPage {
|
|||||||
}
|
}
|
||||||
JFXUtilities.runInFX(() -> {
|
JFXUtilities.runInFX(() -> {
|
||||||
if (profile == repository.getProfile()) {
|
if (profile == repository.getProfile()) {
|
||||||
contentPane.getChildren().setAll(masonryPane);
|
getChildren().setAll(contentPane);
|
||||||
FXUtils.resetChildren(masonryPane, children);
|
FXUtils.resetChildren(masonryPane, children);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,23 +10,23 @@
|
|||||||
maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
|
maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
|
||||||
type="StackPane" pickOnBounds="false"
|
type="StackPane" pickOnBounds="false"
|
||||||
xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1">
|
xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
|
<JFXSpinner fx:id="spinner" styleClass="first-spinner" />
|
||||||
<StackPane fx:id="contentPane">
|
<StackPane fx:id="contentPane">
|
||||||
<JFXSpinner fx:id="spinner" styleClass="first-spinner" />
|
|
||||||
<ScrollPane fitToHeight="true" fitToWidth="true" fx:id="scrollPane" hbarPolicy="NEVER">
|
<ScrollPane fitToHeight="true" fitToWidth="true" fx:id="scrollPane" hbarPolicy="NEVER">
|
||||||
<JFXMasonryPane fx:id="masonryPane" HSpacing="3" VSpacing="3" cellWidth="182" cellHeight="160">
|
<JFXMasonryPane fx:id="masonryPane" HSpacing="3" VSpacing="3" cellWidth="182" cellHeight="160">
|
||||||
</JFXMasonryPane>
|
</JFXMasonryPane>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
|
<VBox style="-fx-padding: 15;" spacing="15" pickOnBounds="false" alignment="BOTTOM_RIGHT">
|
||||||
|
<JFXButton prefWidth="40" prefHeight="40" buttonType="RAISED" fx:id="btnRefresh" styleClass="jfx-button-raised-round">
|
||||||
|
<graphic>
|
||||||
|
<fx:include source="/assets/svg/refresh.fxml" />
|
||||||
|
</graphic>
|
||||||
|
</JFXButton>
|
||||||
|
<JFXButton prefWidth="40" prefHeight="40" buttonType="RAISED" fx:id="btnAdd" styleClass="jfx-button-raised-round">
|
||||||
|
<graphic>
|
||||||
|
<fx:include source="/assets/svg/plus.fxml" />
|
||||||
|
</graphic>
|
||||||
|
</JFXButton>
|
||||||
|
</VBox>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
<VBox style="-fx-padding: 15;" spacing="15" pickOnBounds="false" alignment="BOTTOM_RIGHT">
|
|
||||||
<JFXButton prefWidth="40" prefHeight="40" buttonType="RAISED" fx:id="btnRefresh" styleClass="jfx-button-raised-round">
|
|
||||||
<graphic>
|
|
||||||
<fx:include source="/assets/svg/refresh.fxml" />
|
|
||||||
</graphic>
|
|
||||||
</JFXButton>
|
|
||||||
<JFXButton prefWidth="40" prefHeight="40" buttonType="RAISED" fx:id="btnAdd" styleClass="jfx-button-raised-round">
|
|
||||||
<graphic>
|
|
||||||
<fx:include source="/assets/svg/plus.fxml" />
|
|
||||||
</graphic>
|
|
||||||
</JFXButton>
|
|
||||||
</VBox>
|
|
||||||
</fx:root>
|
</fx:root>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class DefaultGameRepository implements GameRepository {
|
|||||||
@Override
|
@Override
|
||||||
public Version getVersion(String id) {
|
public Version getVersion(String id) {
|
||||||
if (!hasVersion(id))
|
if (!hasVersion(id))
|
||||||
throw new VersionNotFoundException("Version '" + id + "' does not exist.");
|
throw new VersionNotFoundException("Version '" + id + "' does not exist in " + versions.keySet() + ".");
|
||||||
return versions.get(id);
|
return versions.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user