This commit is contained in:
huangyuhui
2018-02-12 23:02:33 +08:00
parent f6c95e3095
commit 03dbecd5ae
5 changed files with 83 additions and 16 deletions

View File

@@ -120,6 +120,8 @@ public final class Decorator extends StackPane implements TaskExecutorDialogWiza
private JFXButton btnClose;
@FXML
private HBox updatePane;
@FXML
private HBox navLeft;
public Decorator(Stage primaryStage, Node mainPage, String title) {
this(primaryStage, mainPage, title, true, true);
@@ -388,6 +390,14 @@ public final class Decorator extends StackPane implements TaskExecutorDialogWiza
updatePane.setVisible(true);
}
private void showCloseNavButton() {
navLeft.getChildren().add(closeNavButton);
}
private void hideCloseNavButton() {
navLeft.getChildren().remove(closeNavButton);
}
private void setContent(Node content, AnimationProducer animation) {
animationHandler.setContent(content, animation);
@@ -396,13 +406,11 @@ public final class Decorator extends StackPane implements TaskExecutorDialogWiza
FXUtils.setOverflowHidden((Region) content);
}
backNavButton.setDisable(!wizardController.canPrev());
if (content instanceof Refreshable)
refreshNavButton.setVisible(true);
if (content != mainPage)
closeNavButton.setVisible(true);
backNavButton.setVisible(true);
String prefix = category == null ? "" : category + " - ";
@@ -464,14 +472,14 @@ public final class Decorator extends StackPane implements TaskExecutorDialogWiza
public void onStart() {
backNavButton.setVisible(true);
backNavButton.setDisable(false);
closeNavButton.setVisible(true);
showCloseNavButton();
refreshNavButton.setVisible(false);
}
@Override
public void onEnd() {
backNavButton.setVisible(false);
closeNavButton.setVisible(false);
hideCloseNavButton();
refreshNavButton.setVisible(false);
}
@@ -495,7 +503,10 @@ public final class Decorator extends StackPane implements TaskExecutorDialogWiza
@FXML
private void onBack() {
wizardController.onPrev(true);
if (wizardController.canPrev())
wizardController.onPrev(true);
else
onCloseNav();
}
@Override

View File

@@ -95,9 +95,19 @@
<fx:include source="/assets/svg/arrow-left.fxml"/>
</graphic>
</JFXButton>
<Label fx:id="titleLabel" style="-fx-text-fill:WHITE; -fx-font-size: 15;"/>
<JFXButton fx:id="closeNavButton" onMouseClicked="#onCloseNav"
styleClass="jfx-decorator-button" ripplerFill="white">
<graphic>
<fx:include source="/assets/svg/close.fxml"/>
</graphic>
</JFXButton>
</HBox>
</left>
<center>
<VBox alignment="CENTER_LEFT"> <!-- don't know why label always be centered when using HBox -->
<Label fx:id="titleLabel" style="-fx-text-fill:WHITE; -fx-font-size: 15;"/>
</VBox>
</center>
<right>
<HBox fx:id="navRight" alignment="CENTER_LEFT">
<JFXButton fx:id="refreshNavButton" onMouseClicked="#onRefresh"
@@ -106,12 +116,6 @@
<fx:include source="/assets/svg/refresh.fxml"/>
</graphic>
</JFXButton>
<JFXButton fx:id="closeNavButton" onMouseClicked="#onCloseNav"
styleClass="jfx-decorator-button" ripplerFill="white">
<graphic>
<fx:include source="/assets/svg/close.fxml"/>
</graphic>
</JFXButton>
<Rectangle height="${navBar.height}" width="1" fill="gray"/>
</HBox>
</right>

View File

@@ -50,9 +50,37 @@
<BorderPane><left><Label text="%settings.launcher.log_font" BorderPane.alignment="CENTER_LEFT" /></left><right><HBox spacing="3"><FontComboBox fontSize="12" enableStyle="false" fx:id="cboFont" /><JFXTextField fx:id="txtFontSize" maxWidth="50" minWidth="50" /></HBox></right></BorderPane>
<Label fx:id="lblDisplay" text="[23:33:33] [Client Thread/INFO] [WaterPower]: Loaded mod WaterPower." />
</VBox>
<StackPane>
<GridPane hgap="20" vgap="10">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="-Infinity" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="Infinity" minWidth="20" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="-Infinity" valignment="TOP" vgrow="SOMETIMES" />
<RowConstraints minHeight="-Infinity" valignment="TOP" vgrow="SOMETIMES" />
<RowConstraints minHeight="-Infinity" valignment="TOP" vgrow="SOMETIMES" />
<RowConstraints minHeight="-Infinity" valignment="TOP" vgrow="SOMETIMES" />
<RowConstraints minHeight="-Infinity" valignment="TOP" vgrow="SOMETIMES" />
<RowConstraints minHeight="-Infinity" valignment="TOP" vgrow="SOMETIMES" />
</rowConstraints>
<Label text="%about.copyright" style="-fx-font-weight: bold;" GridPane.columnIndex="0" GridPane.rowIndex="0" />
<Label wrapText="true" text="%about.copyright.statement" GridPane.columnIndex="1" GridPane.rowIndex="0" />
<Label text="%about.author" style="-fx-font-weight: bold;" GridPane.columnIndex="0" GridPane.rowIndex="1" />
<Label wrapText="true" text="%about.author.statement" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label text="%about.thanks_to" style="-fx-font-weight: bold;" GridPane.columnIndex="0" GridPane.rowIndex="2" />
<Label wrapText="true" text="%about.thanks_to.statement" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<Label text="%about.dependency" style="-fx-font-weight: bold;" GridPane.columnIndex="0" GridPane.rowIndex="3" />
<Label wrapText="true" text="%about.dependency.statement" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Label text="%about.claim" style="-fx-font-weight: bold;" GridPane.columnIndex="0" GridPane.rowIndex="4" />
<Label textAlignment="JUSTIFY" wrapText="true" text="%about.claim.statement" GridPane.columnIndex="1" GridPane.rowIndex="4" />
<Label text="%about.open_source" style="-fx-font-weight: bold;" GridPane.columnIndex="0" GridPane.rowIndex="5" />
<Label wrapText="true" text="%about.open_source.statement" GridPane.columnIndex="1" GridPane.rowIndex="5" />
</GridPane>
</StackPane>
</ComponentList>
<Label wrapText="true" text="%launcher.about" />
</VBox>
</ScrollPane>
</fx:root>

View File

@@ -15,6 +15,19 @@
# along with this program. If not, see {http://www.gnu.org/licenses/}.
#
#author: huangyuhui, dxNeil
about.copyright=Copyright
about.copyright.statement=Copyright (c) 2018 huangyuhui.
about.author=Author
about.author.statement=huanghongxun (MCF: klkl6523)
about.thanks_to=Thanks to
about.thanks_to.statement=bangbang93 (BMCLAPI, http://bmclapi.bangbang93.com/)\ngamerteam (Default background image)\nAll contributors.
about.dependency=Dependency
about.dependency.statement=Gson (Google, Apache License 2.0)\nCommons Compress (Apache, Apache License 2.0)
about.claim=Statement
about.claim.statement=Minecraft is copyrighted by Mojang AB. We are not responsible for any copyright infringement arising from the use of this software.
about.open_source=Open Source
about.open_source.statement=GPL v3 (https://github.com/huanghongxun/HMCL/)
account=Accounts
account.choose=Choose a character
account.create=Create a new account
@@ -161,7 +174,6 @@ launch.unsupported_launcher_version=Sorry, the launcher cannot launch minecraft,
launch.wrong_javadir=Incorrect Java directory, will reset to default Java directory.
launcher=Launcher
launcher.about=About Author\nMinecraft Forum ID: klkl6523\nCopyright (c) 2013 huangyuhui\nOpened source under GPL v3 license:http://github.com/huanghongxun/HMCL/\nThis software used project Gson which is under Apache License 2.0, thanks contributors.
launcher.background_location=Background Location
launcher.background_tooltip=The laucher uses a default background.\nIf you use custom background.png, link it and it will be used.\nIf there is "bg" subdirectory, this app will chooses one picture in "bgskin" randomly.\nIf you set the background setting, this app will use it.
launcher.choose_bgpath=Choose background path.

View File

@@ -15,6 +15,19 @@
# along with this program. If not, see {http://www.gnu.org/licenses/}.
#
#author: huangyuhui
about.copyright=版权
about.copyright.statement=Copyright (c) 2018 huangyuhui.
about.author=作者
about.author.statement=huanghongxun (百度贴吧huanghongxun20)
about.thanks_to=鸣谢
about.thanks_to.statement=bangbang93 (BMCLAPI, http://bmclapi.bangbang93.com/)\ngamerteam (默认背景图)\n所有参与本项目,issue,pull requests的贡献者
about.dependency=依赖
about.dependency.statement=Gson (Google, Apache License 2.0)\nCommons Compress (Apache, Apache License 2.0)
about.claim=免责声明
about.claim.statement=Minecraft 版权归 Mojang AB 所有,使用本软件产生的版权问题,软件制作方概不负责。请支持正版。
about.open_source=开源
about.open_source.statement=GPL v3 (https://github.com/huanghongxun/HMCL/)
account=账户
account.choose=选择一个角色
account.create=新建账户
@@ -161,7 +174,6 @@ launch.unsupported_launcher_version=对不起,本启动器现在可能不能
launch.wrong_javadir=错误的Java路径将自动重置为默认Java路径。
launcher=启动器
launcher.about=默认背景图感谢gamerteam提供。\n关于作者\n百度IDhuanghongxun20; mcbbshuanghongxun; Minecraft Forum ID: klkl6523\nCopyright (c) 2018 huangyuhui.\n免责声明Minecraft软件版权归Mojang AB所有\n使用本软件产生的版权问题本软件制作方概不负责。\n本启动器在GPLv3协议下开源:https://github.com/huanghongxun/HMCL/ ,\n感谢issues和pull requests贡献者\n本软件使用了基于Apache License 2.0的Gson项目感谢贡献者。
launcher.background_location=背景地址
launcher.background_tooltip=启动器默认使用自带的背景\n如果当前目录有background.png则会使用该文件作为背景\n如果当前目录有bg子目录则会随机使用里面的一张图作为背景\n如果该背景地址被修改则会使用背景地址里的一张图作为背景\n背景地址允许有多个地址使用半角分号";"(不包含双引号)分隔
launcher.choose_bgpath=选择背景路径