1

feat: меню "о программе"

This commit is contained in:
2025-02-27 16:13:20 +03:00
parent fbda5eebcd
commit 9d36ba6d6d
2 changed files with 20 additions and 5 deletions

View File

@@ -6,10 +6,7 @@ import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.Parent; import javafx.scene.Parent;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.ContextMenu; import javafx.scene.control.*;
import javafx.scene.control.MenuItem;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.stage.*; import javafx.stage.*;
import lombok.Setter; import lombok.Setter;
import ru.di9.ss14.extractor.ContentDbManager; import ru.di9.ss14.extractor.ContentDbManager;
@@ -101,6 +98,21 @@ public class MainController implements Initializable {
}); });
} }
public void onClickAboutMenu() {
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle("О программе");
alert.setHeaderText(null);
alert.setContentText("""
-- SS14: Content Extractor --
Автор: Voomra, 2025
Версия: 1.0
Программа предназначена для выгрузки загруженного через "Space Station 14 Launcher" контента.
""");
alert.showAndWait();
}
private void createTreeItems(TreeItem<String> parentItem, SortedSet<ContentRec> sortedSet) { private void createTreeItems(TreeItem<String> parentItem, SortedSet<ContentRec> sortedSet) {
sortedSet.forEach(contentRec -> { sortedSet.forEach(contentRec -> {
var fileItem = new TreeItemExt<>( var fileItem = new TreeItemExt<>(

View File

@@ -6,11 +6,14 @@
maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
prefWidth="600.0" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1"> prefWidth="600.0" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1">
<MenuBar> <MenuBar>
<Menu mnemonicParsing="false" text="File"> <Menu mnemonicParsing="false" text="Файл">
<MenuItem onAction="#onClickOpenMenu" mnemonicParsing="false" text="Открыть"/> <MenuItem onAction="#onClickOpenMenu" mnemonicParsing="false" text="Открыть"/>
<SeparatorMenuItem mnemonicParsing="false"/> <SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem mnemonicParsing="false" text="Выход"/> <MenuItem mnemonicParsing="false" text="Выход"/>
</Menu> </Menu>
<Menu mnemonicParsing="false" text="Помощь">
<MenuItem onAction="#onClickAboutMenu" mnemonicParsing="false" text="О программе"/>
</Menu>
</MenuBar> </MenuBar>
<TreeView fx:id="treeView" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS"/> <TreeView fx:id="treeView" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS"/>
</VBox> </VBox>