Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions HMCL/src/main/java/org/jackhuang/hmcl/setting/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,21 @@ public void setTitleTransparent(boolean titleTransparent) {
this.titleTransparent.set(titleTransparent);
}

@SerializedName("showHelpButton")
private final BooleanProperty showHelpButton = new SimpleBooleanProperty(true);

public BooleanProperty showHelpButtonProperty() {
return showHelpButton;
}

public boolean isShowHelpButton() {
return showHelpButton.get();
}

public void setShowHelpButton(boolean showHelpButton) {
this.showHelpButton.set(showHelpButton);
}

@SerializedName("backgroundType")
private final ObjectProperty<EnumBackgroundImage> backgroundImageType = new RawPreservingObjectProperty<>(EnumBackgroundImage.DEFAULT);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

import javafx.util.Duration;
import org.jackhuang.hmcl.Metadata;
import org.jackhuang.hmcl.setting.ConfigHolder;
import org.jackhuang.hmcl.theme.Themes;
import org.jackhuang.hmcl.ui.FXUtils;
import org.jackhuang.hmcl.ui.SVG;
Expand Down Expand Up @@ -236,6 +237,7 @@ public DecoratorSkin(Decorator control) {
btnHelp.setGraphic(SVG.HELP.createIcon(Themes.titleFillProperty()));
btnHelp.getStyleClass().add("jfx-decorator-button");
btnHelp.setOnAction(e -> FXUtils.openLink(Metadata.CONTACT_URL));
btnHelp.visibleProperty().bind(ConfigHolder.config().showHelpButtonProperty());

JFXButton btnMin = new JFXButton();
btnMin.setFocusTraversable(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ public PersonalizationPage() {
titleTransparentButton.selectedProperty().bindBidirectional(config().titleTransparentProperty());
titleTransparentButton.setTitle(i18n("settings.launcher.title_transparent"));
}
{
LineToggleButton showHelpButtonButton = new LineToggleButton();
themeList.getContent().add(showHelpButtonButton);
showHelpButtonButton.selectedProperty().bindBidirectional(config().showHelpButtonProperty());
showHelpButtonButton.setTitle(i18n("settings.launcher.show_help_button"));
}
{
LineToggleButton animationButton = new LineToggleButton();
themeList.getContent().add(animationButton);
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,7 @@ settings.launcher.proxy.socks=SOCKS
settings.launcher.proxy.username=Username
settings.launcher.theme=Theme Color
settings.launcher.title_transparent=Transparent Titlebar
settings.launcher.show_help_button=Show Help Button
settings.launcher.turn_off_animations=Disable Animation
settings.launcher.version_list_source=Version List
settings.launcher.background.settings.opacity=Opacity
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@ settings.launcher.proxy.socks=SOCKS
settings.launcher.proxy.username=帳戶
settings.launcher.theme=主題色
settings.launcher.title_transparent=標題欄透明
settings.launcher.show_help_button=顯示說明按鈕
settings.launcher.turn_off_animations=關閉動畫
settings.launcher.version_list_source=版本清單來源
settings.launcher.background.settings.opacity=不透明度
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,7 @@ settings.launcher.proxy.socks=SOCKS
settings.launcher.proxy.username=账户
settings.launcher.theme=主题色
settings.launcher.title_transparent=标题栏透明
settings.launcher.show_help_button=显示帮助按钮
settings.launcher.turn_off_animations=关闭动画
settings.launcher.version_list_source=版本列表源
settings.launcher.background.settings.opacity=不透明度
Expand Down