Weiter Ingame an den animationen gepfeilt
This commit is contained in:
@@ -11410,6 +11410,11 @@ public class EditorApp extends Application {
|
||||
saveCurrentAnimSet(animSetCurrentName, animSetCurrentDir);
|
||||
}
|
||||
|
||||
private void autoSaveCharacter() {
|
||||
if (charIdField == null || charIdField.getText().trim().isBlank()) return;
|
||||
saveCharacter(ASSET_ROOT.resolve("Characters"));
|
||||
}
|
||||
|
||||
private void saveCurrentAnimSet(String setName, Path setDir) {
|
||||
if (animSetClipListView == null) {
|
||||
return;
|
||||
@@ -12037,16 +12042,6 @@ public class EditorApp extends Application {
|
||||
VBox inner = new VBox(8);
|
||||
inner.setPadding(new Insets(10));
|
||||
|
||||
Button newCharBtn = new Button("Neuer Charakter");
|
||||
newCharBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
newCharBtn.setOnAction(e -> clearCharacterForm());
|
||||
|
||||
Button importCharModelBtn = new Button("Character-Modell importieren (FBX)…");
|
||||
importCharModelBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
importCharModelBtn.setStyle("-fx-font-weight: bold;");
|
||||
importCharModelBtn.setOnAction(e -> handleCharacterModelImport(importCharModelBtn.getScene().getWindow()));
|
||||
|
||||
inner.getChildren().addAll(newCharBtn, importCharModelBtn);
|
||||
|
||||
charEditorStatusLabel = new Label("Wähle einen Character im Baum oder erstelle einen neuen");
|
||||
charEditorStatusLabel.setWrapText(true);
|
||||
@@ -12097,18 +12092,6 @@ public class EditorApp extends Application {
|
||||
refreshCharAnimSetCombo();
|
||||
charAnimSetCombo.setOnAction(e -> updateCharActionCombosFromSet());
|
||||
|
||||
Button stripClipsBtn = new Button("Eingebettete Clips löschen");
|
||||
stripClipsBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
stripClipsBtn.setDisable(true);
|
||||
charModelCombo.valueProperty().addListener((obs, ov, nv) ->
|
||||
stripClipsBtn.setDisable(nv == null || nv.isBlank()));
|
||||
stripClipsBtn.setOnAction(e -> {
|
||||
String modelPath = charModelCombo.getValue();
|
||||
if (modelPath == null || modelPath.isBlank()) return;
|
||||
if (charEditorStatusLabel != null)
|
||||
charEditorStatusLabel.setText("Entferne eingebettete Clips…");
|
||||
input.animStripClipsRequest.set(modelPath);
|
||||
});
|
||||
|
||||
charEditContainer.getChildren().addAll(
|
||||
dl.apply("ID:"), charIdField,
|
||||
@@ -12202,8 +12185,7 @@ public class EditorApp extends Application {
|
||||
charEditContainer.getChildren().add(charNpcSection);
|
||||
charEditContainer.getChildren().addAll(
|
||||
dl.apply("Modell:"), charModelCombo,
|
||||
dl.apply("Anim-Set:"), charAnimSetCombo,
|
||||
stripClipsBtn
|
||||
dl.apply("Anim-Set:"), charAnimSetCombo
|
||||
);
|
||||
|
||||
// ── Aktions-Zuweisung ─────────────────────────────────────────────────
|
||||
@@ -12214,13 +12196,20 @@ public class EditorApp extends Application {
|
||||
charActionLabelsBox.getChildren().add(actionHint);
|
||||
charEditContainer.getChildren().add(charActionLabelsBox);
|
||||
|
||||
// ── Speichern ─────────────────────────────────────────────────────────
|
||||
charEditContainer.getChildren().add(new Separator());
|
||||
Button saveCharBtn = new Button("Charakter speichern");
|
||||
saveCharBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
saveCharBtn.setStyle("-fx-font-weight:bold;-fx-background-color:#3a7a3a;-fx-text-fill:white;");
|
||||
saveCharBtn.setOnAction(e -> saveCharacter(charDir));
|
||||
charEditContainer.getChildren().add(saveCharBtn);
|
||||
// ── Auto-Save-Listener ────────────────────────────────────────────────
|
||||
charIdField.focusedProperty().addListener((obs, ov, nv) -> { if (!nv) autoSaveCharacter(); });
|
||||
charTypeCombo.valueProperty().addListener((obs, ov, nv) -> autoSaveCharacter());
|
||||
charModelCombo.valueProperty().addListener((obs, ov, nv) -> autoSaveCharacter());
|
||||
charAnimSetCombo.valueProperty().addListener((obs, ov, nv) -> autoSaveCharacter());
|
||||
charFractionCombo.valueProperty().addListener((obs, ov, nv) -> autoSaveCharacter());
|
||||
charStatusCombo.valueProperty().addListener((obs, ov, nv) -> autoSaveCharacter());
|
||||
charTraderCheck.selectedProperty().addListener((obs, ov, nv) -> autoSaveCharacter());
|
||||
charTraderItemsView.getItems().addListener(
|
||||
(javafx.collections.ListChangeListener<String>) c -> autoSaveCharacter());
|
||||
charMsgFriendly.focusedProperty().addListener((obs, ov, nv) -> { if (!nv) autoSaveCharacter(); });
|
||||
charMsgNeutral.focusedProperty().addListener((obs, ov, nv) -> { if (!nv) autoSaveCharacter(); });
|
||||
charMsgEnraged.focusedProperty().addListener((obs, ov, nv) -> { if (!nv) autoSaveCharacter(); });
|
||||
charMsgEnemy.focusedProperty().addListener((obs, ov, nv) -> { if (!nv) autoSaveCharacter(); });
|
||||
|
||||
inner.getChildren().add(charEditContainer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user