feat: меню "о программе"
This commit is contained in:
@@ -6,10 +6,7 @@ import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.ContextMenu;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import javafx.scene.control.TreeItem;
|
||||
import javafx.scene.control.TreeView;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.stage.*;
|
||||
import lombok.Setter;
|
||||
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) {
|
||||
sortedSet.forEach(contentRec -> {
|
||||
var fileItem = new TreeItemExt<>(
|
||||
|
||||
@@ -6,11 +6,14 @@
|
||||
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">
|
||||
<MenuBar>
|
||||
<Menu mnemonicParsing="false" text="File">
|
||||
<Menu mnemonicParsing="false" text="Файл">
|
||||
<MenuItem onAction="#onClickOpenMenu" mnemonicParsing="false" text="Открыть"/>
|
||||
<SeparatorMenuItem mnemonicParsing="false"/>
|
||||
<MenuItem mnemonicParsing="false" text="Выход"/>
|
||||
</Menu>
|
||||
<Menu mnemonicParsing="false" text="Помощь">
|
||||
<MenuItem onAction="#onClickAboutMenu" mnemonicParsing="false" text="О программе"/>
|
||||
</Menu>
|
||||
</MenuBar>
|
||||
<TreeView fx:id="treeView" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS"/>
|
||||
</VBox>
|
||||
|
||||
Reference in New Issue
Block a user