Shortcuts für Brush Tools ergänzt
This commit is contained in:
@@ -269,6 +269,22 @@ public class EditorApp extends Application {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Tab: Sub-Modus innerhalb des aktiven Tools cyclen
|
||||
if (e.getCode() == KeyCode.TAB && "world".equals(currentTool)
|
||||
&& !e.isAltDown() && !e.isControlDown()
|
||||
&& !(scene.getFocusOwner() instanceof javafx.scene.control.TextInputControl)) {
|
||||
e.consume();
|
||||
cycleToolSubMode();
|
||||
return;
|
||||
}
|
||||
// Numpad +/-: Höhenparameter des aktiven Tools anpassen
|
||||
if ((e.getCode() == KeyCode.ADD || e.getCode() == KeyCode.SUBTRACT)
|
||||
&& "world".equals(currentTool)
|
||||
&& !(scene.getFocusOwner() instanceof javafx.scene.control.TextInputControl)) {
|
||||
e.consume();
|
||||
adjustHeightParam(e.getCode() == KeyCode.ADD ? +1 : -1);
|
||||
return;
|
||||
}
|
||||
handleKeyPress(e.getCode(), true);
|
||||
});
|
||||
scene.addEventFilter(javafx.scene.input.KeyEvent.KEY_RELEASED, e -> handleKeyPress(e.getCode(), false));
|
||||
@@ -508,6 +524,12 @@ public class EditorApp extends Application {
|
||||
terrainController.showToolParameters(toolPanel, input.activeTool);
|
||||
}
|
||||
|
||||
// Pinsel-Parameter via Alt/Shift+Scroll geändert → Slider aktualisieren
|
||||
if (input.brushParamsChanged && "world".equals(currentTool)) {
|
||||
input.brushParamsChanged = false;
|
||||
terrainController.refreshCurrentPanel();
|
||||
}
|
||||
|
||||
// Neues JME-Image nach Viewport-Resize übernehmen
|
||||
javafx.scene.image.WritableImage newImg = input.resizedImage.getAndSet(null);
|
||||
if (newImg != null) {
|
||||
@@ -1007,6 +1029,38 @@ public class EditorApp extends Application {
|
||||
}
|
||||
}
|
||||
|
||||
// ── Höhenparameter per Numpad +/- anpassen ───────────────────────────────
|
||||
|
||||
private void adjustHeightParam(int direction) {
|
||||
de.blight.editor.tool.EditorTool tool = input.activeTool;
|
||||
if (tool == null) return;
|
||||
de.blight.editor.tool.ToolParameter hp = tool.getHeightParam();
|
||||
if (hp == null) return;
|
||||
double step = input.ctrlHeld ? 10.0 : (input.shiftHeld ? 0.1 : 1.0);
|
||||
hp.setValue(hp.getValue() + direction * step);
|
||||
terrainController.refreshCurrentPanel();
|
||||
}
|
||||
|
||||
// ── Sub-Tool / Modus-Cycle (Tab) ─────────────────────────────────────────
|
||||
|
||||
private void cycleToolSubMode() {
|
||||
de.blight.editor.tool.EditorTool tool = input.activeTool;
|
||||
if (tool == null) return;
|
||||
|
||||
// Gras-Kontext: zwischen den drei Gras-Sub-Tools wechseln
|
||||
if (tool == input.grassTool || tool == input.grassVertexTool || tool == input.terrainGrassTool) {
|
||||
grassController.cycleSubTool();
|
||||
return;
|
||||
}
|
||||
|
||||
// Alle anderen Tools: ersten ChoiceToolParameter cyclen
|
||||
java.util.List<de.blight.editor.tool.ChoiceToolParameter> choices = tool.getChoiceParameters();
|
||||
if (choices.isEmpty()) return;
|
||||
de.blight.editor.tool.ChoiceToolParameter param = choices.get(0);
|
||||
int next = (param.getSelectedIndex() + 1) % param.getChoices().length;
|
||||
param.setSelectedIndex(next);
|
||||
terrainController.showToolParameters(toolPanel, tool);
|
||||
}
|
||||
|
||||
// ── Animations-Vorschau-Werkzeug ─────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -68,6 +68,10 @@ public class SharedInput {
|
||||
public volatile boolean ctrlHeld;
|
||||
public volatile boolean altHeld;
|
||||
|
||||
// ── Pinsel-Scroll (Alt+Rad = Radius, Shift+Rad = Stärke) ─────────────────
|
||||
/** Gesetzt von ViewportController wenn Pinselparameter per Scroll geändert wurden; EditorApp liest + resettet. */
|
||||
public volatile boolean brushParamsChanged = false;
|
||||
|
||||
// ── Debug-Toggle: Strg+F8 schaltet Raw-Texture-Modus (kein Lighting) ─────
|
||||
public volatile boolean debugNoLightToggle;
|
||||
|
||||
|
||||
@@ -18,4 +18,13 @@ public abstract class EditorTool {
|
||||
public List<ChoiceToolParameter> getChoiceParameters() {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
/** Pinselradius-Parameter für Alt+Scroll-Shortcut. null wenn kein Radius vorhanden. */
|
||||
public ToolParameter getBrushRadius() { return null; }
|
||||
|
||||
/** Pinselstärke-Parameter für Shift+Scroll-Shortcut. null wenn keine Stärke vorhanden. */
|
||||
public ToolParameter getBrushStrength() { return null; }
|
||||
|
||||
/** Höhen-Parameter für +/−-Stepper (1m/0,1m-Schritte). null wenn nicht vorhanden. */
|
||||
public ToolParameter getHeightParam() { return null; }
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@ public class GrassTool extends EditorTool {
|
||||
@Override
|
||||
public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); }
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
@Override public ToolParameter getHeightParam() { return grassHeight; }
|
||||
|
||||
@Override
|
||||
public List<ToolParameter> getParameters() { return List.of(brushRadius, grassHeight, density); }
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ public class GrassVertexTool extends EditorTool {
|
||||
@Override
|
||||
public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); }
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
@Override public ToolParameter getHeightParam() { return bladeHeight; }
|
||||
|
||||
@Override
|
||||
public List<ToolParameter> getParameters() { return List.of(brushRadius, bladeHeight, density, dryness, uniformity, seedDensity); }
|
||||
}
|
||||
|
||||
@@ -38,6 +38,10 @@ public class HeightTool extends EditorTool {
|
||||
return List.of(mode);
|
||||
}
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
@Override public ToolParameter getBrushStrength() { return brushStrength; }
|
||||
@Override public ToolParameter getHeightParam() { return plateauHeight; }
|
||||
|
||||
@Override
|
||||
public List<ToolParameter> getParameters() {
|
||||
return List.of(brushRadius, brushStrength, plateauHeight);
|
||||
|
||||
@@ -27,6 +27,8 @@ public class HoleTool extends EditorTool {
|
||||
return List.of(mode);
|
||||
}
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
|
||||
@Override
|
||||
public List<ToolParameter> getParameters() {
|
||||
return List.of(brushRadius);
|
||||
|
||||
@@ -32,6 +32,9 @@ public class SculptMeshTool extends EditorTool {
|
||||
@Override
|
||||
public List<ChoiceToolParameter> getChoiceParameters() { return List.of(mode); }
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
@Override public ToolParameter getBrushStrength() { return brushStrength; }
|
||||
|
||||
@Override
|
||||
public List<ToolParameter> getParameters() { return List.of(brushRadius, brushStrength); }
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ public class StoneTool extends EditorTool {
|
||||
|
||||
@Override public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); }
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
|
||||
@Override public List<ToolParameter> getParameters() {
|
||||
return List.of(brushRadius, minSize, maxSize, density);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ public class TerrainColorGrassTool extends EditorTool {
|
||||
|
||||
@Override public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); }
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
@Override public ToolParameter getHeightParam() { return bladeHeight; }
|
||||
|
||||
@Override public List<ToolParameter> getParameters() {
|
||||
return List.of(brushRadius, bladeHeight, density, uniformity, seedDensity);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,9 @@ public class TextureTool extends EditorTool {
|
||||
@Override
|
||||
public List<ChoiceToolParameter> getChoiceParameters() { return List.of(textureIndex); }
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
@Override public ToolParameter getBrushStrength() { return brushStrength; }
|
||||
|
||||
@Override
|
||||
public List<ToolParameter> getParameters() { return List.of(brushRadius, brushStrength); }
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@ public class UpperHeightTool extends EditorTool {
|
||||
return List.of(mode);
|
||||
}
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
@Override public ToolParameter getBrushStrength() { return brushStrength; }
|
||||
|
||||
@Override
|
||||
public List<ToolParameter> getParameters() {
|
||||
return List.of(brushRadius, brushStrength);
|
||||
|
||||
@@ -59,6 +59,10 @@ public class VoxelTool extends EditorTool {
|
||||
return List.of(mode);
|
||||
}
|
||||
|
||||
@Override public ToolParameter getBrushRadius() { return brushRadius; }
|
||||
@Override public ToolParameter getBrushStrength() { return brushStrength; }
|
||||
@Override public ToolParameter getHeightParam() { return plateauTarget; }
|
||||
|
||||
@Override
|
||||
public List<ToolParameter> getParameters() {
|
||||
return List.of(brushRadius, brushStrength, plateauTarget);
|
||||
|
||||
@@ -24,6 +24,10 @@ public class GrassController {
|
||||
private final BiConsumer<VBox, EditorTool> showToolParams;
|
||||
private final Function<Path, String> normalMapLoader;
|
||||
|
||||
// Sub-Tool-Cycle: gesetzt in buildPanel(), genutzt von cycleSubTool()
|
||||
private ToggleButton subTexBtn, subVertBtn, subTerrainBtn;
|
||||
private Runnable activateTex, activateVert, activateTerrain;
|
||||
|
||||
public GrassController(ToolContext ctx,
|
||||
ImageView viewport,
|
||||
BiConsumer<VBox, EditorTool> showToolParams,
|
||||
@@ -48,21 +52,21 @@ public class GrassController {
|
||||
title.setStyle("-fx-font-weight: bold; -fx-font-size: 13; -fx-text-fill: #111;");
|
||||
panel.getChildren().addAll(title, new Separator());
|
||||
|
||||
ToggleButton grassSubTexBtn = new ToggleButton(":: Textur");
|
||||
ToggleButton grassSubVertBtn = new ToggleButton("|| Vertex");
|
||||
ToggleButton grassSubTerrainBtn = new ToggleButton("~~ Terrain");
|
||||
grassSubTexBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
grassSubVertBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
grassSubTerrainBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
subTexBtn = new ToggleButton(":: Textur");
|
||||
subVertBtn = new ToggleButton("|| Vertex");
|
||||
subTerrainBtn = new ToggleButton("~~ Terrain");
|
||||
subTexBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
subVertBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
subTerrainBtn.setMaxWidth(Double.MAX_VALUE);
|
||||
ToggleGroup subGroup = new ToggleGroup();
|
||||
grassSubTexBtn.setToggleGroup(subGroup);
|
||||
grassSubVertBtn.setToggleGroup(subGroup);
|
||||
grassSubTerrainBtn.setToggleGroup(subGroup);
|
||||
subTexBtn.setToggleGroup(subGroup);
|
||||
subVertBtn.setToggleGroup(subGroup);
|
||||
subTerrainBtn.setToggleGroup(subGroup);
|
||||
subGroup.selectedToggleProperty().addListener((obs, o, n) -> { if (n == null) subGroup.selectToggle(o); });
|
||||
HBox subRow = new HBox(4, grassSubTexBtn, grassSubVertBtn, grassSubTerrainBtn);
|
||||
HBox.setHgrow(grassSubTexBtn, Priority.ALWAYS);
|
||||
HBox.setHgrow(grassSubVertBtn, Priority.ALWAYS);
|
||||
HBox.setHgrow(grassSubTerrainBtn, Priority.ALWAYS);
|
||||
HBox subRow = new HBox(4, subTexBtn, subVertBtn, subTerrainBtn);
|
||||
HBox.setHgrow(subTexBtn, Priority.ALWAYS);
|
||||
HBox.setHgrow(subVertBtn, Priority.ALWAYS);
|
||||
HBox.setHgrow(subTerrainBtn, Priority.ALWAYS);
|
||||
panel.getChildren().add(subRow);
|
||||
|
||||
VBox paramsBox = new VBox(10);
|
||||
@@ -126,7 +130,7 @@ public class GrassController {
|
||||
new Label("Vertrocknet:"), dryPicker);
|
||||
panel.getChildren().add(colorSection);
|
||||
|
||||
Runnable activateTex = () -> {
|
||||
activateTex = () -> {
|
||||
ctx.input().activeLayer = 3;
|
||||
ctx.input().activeTool = ctx.input().grassTool;
|
||||
paramsBox.getChildren().clear();
|
||||
@@ -136,7 +140,7 @@ public class GrassController {
|
||||
colorSection.setVisible(true);
|
||||
colorSection.setManaged(true);
|
||||
};
|
||||
Runnable activateVert = () -> {
|
||||
activateVert = () -> {
|
||||
ctx.input().activeLayer = SharedInput.LAYER_GRASS_VERTEX;
|
||||
ctx.input().activeTool = ctx.input().grassVertexTool;
|
||||
paramsBox.getChildren().clear();
|
||||
@@ -146,7 +150,7 @@ public class GrassController {
|
||||
colorSection.setVisible(true);
|
||||
colorSection.setManaged(true);
|
||||
};
|
||||
Runnable activateTerrain = () -> {
|
||||
activateTerrain = () -> {
|
||||
ctx.input().activeLayer = SharedInput.LAYER_TERRAIN_GRASS;
|
||||
ctx.input().activeTool = ctx.input().terrainGrassTool;
|
||||
paramsBox.getChildren().clear();
|
||||
@@ -157,24 +161,40 @@ public class GrassController {
|
||||
colorSection.setManaged(false);
|
||||
};
|
||||
|
||||
grassSubTexBtn.setOnAction(e -> activateTex.run());
|
||||
grassSubVertBtn.setOnAction(e -> activateVert.run());
|
||||
grassSubTerrainBtn.setOnAction(e -> activateTerrain.run());
|
||||
subTexBtn.setOnAction(e -> activateTex.run());
|
||||
subVertBtn.setOnAction(e -> activateVert.run());
|
||||
subTerrainBtn.setOnAction(e -> activateTerrain.run());
|
||||
|
||||
if (ctx.input().activeLayer == SharedInput.LAYER_GRASS_VERTEX) {
|
||||
grassSubVertBtn.setSelected(true);
|
||||
subVertBtn.setSelected(true);
|
||||
activateVert.run();
|
||||
} else if (ctx.input().activeLayer == SharedInput.LAYER_TERRAIN_GRASS) {
|
||||
grassSubTerrainBtn.setSelected(true);
|
||||
subTerrainBtn.setSelected(true);
|
||||
activateTerrain.run();
|
||||
} else {
|
||||
grassSubTexBtn.setSelected(true);
|
||||
subTexBtn.setSelected(true);
|
||||
activateTex.run();
|
||||
}
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
/** Wechselt zum nächsten Gras-Sub-Tool: Textur → Vertex → Terrain → Textur … */
|
||||
public void cycleSubTool() {
|
||||
if (activateTex == null) return;
|
||||
SharedInput input = ctx.input();
|
||||
if (input.activeTool == input.grassTool) {
|
||||
subVertBtn.setSelected(true);
|
||||
activateVert.run();
|
||||
} else if (input.activeTool == input.grassVertexTool) {
|
||||
subTerrainBtn.setSelected(true);
|
||||
activateTerrain.run();
|
||||
} else {
|
||||
subTexBtn.setSelected(true);
|
||||
activateTex.run();
|
||||
}
|
||||
}
|
||||
|
||||
public javafx.scene.Node buildGrassTextureUI() {
|
||||
Label title = new Label("Textur-Slots");
|
||||
title.setStyle("-fx-text-fill: #111111; -fx-font-weight: bold;");
|
||||
|
||||
@@ -136,12 +136,65 @@ public class TerrainPanelController {
|
||||
return names[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Baut eine Höhen-Eingabezeile: [−] [TextField] [+].
|
||||
* Strg=10m-Schritt, Shift=0,1m-Schritt, sonst 1m.
|
||||
*/
|
||||
private VBox buildHeightStepperUI(ToolParameter param) {
|
||||
Label nameLabel = new Label(param.getName());
|
||||
nameLabel.setStyle("-fx-text-fill: #111111;");
|
||||
|
||||
TextField tf = new TextField(String.format(java.util.Locale.US, "%.2f", param.getValue()));
|
||||
tf.setStyle("-fx-font-size: 12;");
|
||||
|
||||
Runnable commitTf = () -> {
|
||||
try {
|
||||
double v = Double.parseDouble(tf.getText().replace(',', '.'));
|
||||
param.setValue(v);
|
||||
tf.setText(String.format(java.util.Locale.US, "%.2f", param.getValue()));
|
||||
} catch (NumberFormatException ignored) {
|
||||
tf.setText(String.format(java.util.Locale.US, "%.2f", param.getValue()));
|
||||
}
|
||||
};
|
||||
tf.setOnAction(e -> commitTf.run());
|
||||
tf.focusedProperty().addListener((o, ov, nv) -> { if (!nv) commitTf.run(); });
|
||||
|
||||
Button minusBtn = new Button("−");
|
||||
Button plusBtn = new Button("+");
|
||||
minusBtn.setMinWidth(32);
|
||||
plusBtn.setMinWidth(32);
|
||||
minusBtn.setStyle("-fx-font-size: 13; -fx-font-weight: bold;");
|
||||
plusBtn.setStyle("-fx-font-size: 13; -fx-font-weight: bold;");
|
||||
|
||||
minusBtn.setOnAction(e -> {
|
||||
double step = input.ctrlHeld ? 10.0 : (input.shiftHeld ? 0.1 : 1.0);
|
||||
param.setValue(param.getValue() - step);
|
||||
tf.setText(String.format(java.util.Locale.US, "%.2f", param.getValue()));
|
||||
});
|
||||
plusBtn.setOnAction(e -> {
|
||||
double step = input.ctrlHeld ? 10.0 : (input.shiftHeld ? 0.1 : 1.0);
|
||||
param.setValue(param.getValue() + step);
|
||||
tf.setText(String.format(java.util.Locale.US, "%.2f", param.getValue()));
|
||||
});
|
||||
|
||||
HBox row = new HBox(4, minusBtn, tf, plusBtn);
|
||||
HBox.setHgrow(tf, Priority.ALWAYS);
|
||||
row.setAlignment(Pos.CENTER_LEFT);
|
||||
return new VBox(3, nameLabel, row);
|
||||
}
|
||||
|
||||
public static void applyModeButtonStyle(ToggleButton btn, boolean active) {
|
||||
btn.setStyle(active
|
||||
? "-fx-background-color: #4a90d9; -fx-text-fill: white; -fx-background-radius: 4;"
|
||||
: "-fx-background-color: #d0d0d0; -fx-text-fill: #333; -fx-background-radius: 4;");
|
||||
}
|
||||
|
||||
public void refreshCurrentPanel() {
|
||||
if (toolPanelRef != null && input.activeTool != null) {
|
||||
showToolParameters(toolPanelRef, input.activeTool);
|
||||
}
|
||||
}
|
||||
|
||||
public void showToolParameters(VBox panel, EditorTool tool) {
|
||||
toolPanelRef = panel;
|
||||
panel.getChildren().clear();
|
||||
@@ -237,6 +290,8 @@ public class TerrainPanelController {
|
||||
}
|
||||
}
|
||||
|
||||
ToolParameter heightParam = tool.getHeightParam();
|
||||
|
||||
for (ToolParameter param : tool.getParameters()) {
|
||||
Label name = new Label(param.getName());
|
||||
name.setStyle("-fx-text-fill: #111111;");
|
||||
@@ -256,23 +311,8 @@ public class TerrainPanelController {
|
||||
param.setValue(Math.round(newV.doubleValue())));
|
||||
panel.getChildren().add(new VBox(3, name, withField(slider, "%.0f")));
|
||||
|
||||
} else if (tool instanceof de.blight.editor.tool.VoxelTool vtP
|
||||
&& param == vtP.plateauTarget) {
|
||||
// x.5-gestufter Slider: min=0.5, Schritt=1 → 0.5, 1.5, 2.5, …
|
||||
double initSnap = Math.round(param.getValue() - 0.5) + 0.5;
|
||||
initSnap = Math.max(0.5, Math.min(49.5, initSnap));
|
||||
Slider slider = new Slider(0.5, 49.5, initSnap);
|
||||
slider.setShowTickMarks(true);
|
||||
slider.setShowTickLabels(true);
|
||||
slider.setMajorTickUnit(5);
|
||||
slider.setMinorTickCount(4);
|
||||
slider.setSnapToTicks(true);
|
||||
slider.setBlockIncrement(1.0);
|
||||
slider.valueProperty().addListener((obs, oldV, newV) -> {
|
||||
double sv = Math.round(newV.doubleValue() - 0.5) + 0.5;
|
||||
param.setValue(sv);
|
||||
});
|
||||
panel.getChildren().add(new VBox(3, name, withField(slider, "%.1f")));
|
||||
} else if (heightParam != null && param == heightParam) {
|
||||
panel.getChildren().add(buildHeightStepperUI(param));
|
||||
|
||||
} else {
|
||||
Slider slider = new Slider(param.getMin(), param.getMax(), param.getValue());
|
||||
|
||||
@@ -271,7 +271,33 @@ public class ViewportController {
|
||||
pane.setOnMouseExited(e -> input.mouseScreenX = -1f);
|
||||
|
||||
viewport.setOnScroll(e -> {
|
||||
int steps = (int) Math.signum(e.getDeltaY());
|
||||
// Auf manchen Linux-Desktops wandelt Shift+Scrollen deltaY → deltaX um;
|
||||
// daher als Fallback deltaX verwenden wenn deltaY == 0.
|
||||
double rawDelta = e.getDeltaY() != 0 ? e.getDeltaY() : -e.getDeltaX();
|
||||
int steps = (int) Math.signum(rawDelta);
|
||||
if (steps == 0) return;
|
||||
|
||||
if (e.isAltDown()) {
|
||||
de.blight.editor.tool.ToolParameter radius = input.activeTool != null ? input.activeTool.getBrushRadius() : null;
|
||||
if (radius != null) {
|
||||
// logarithmischer Schritt: 15% des aktuellen Werts, mindestens 1
|
||||
double step = Math.max(1.0, radius.getValue() * 0.15);
|
||||
radius.setValue(radius.getValue() + steps * step);
|
||||
input.brushParamsChanged = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (e.isShiftDown()) {
|
||||
de.blight.editor.tool.ToolParameter strength = input.activeTool != null ? input.activeTool.getBrushStrength() : null;
|
||||
if (strength != null) {
|
||||
double step = strength.getValue() * 0.15;
|
||||
if (step == 0) step = (strength.getMax() - strength.getMin()) * 0.01;
|
||||
strength.setValue(strength.getValue() - steps * step);
|
||||
input.brushParamsChanged = true;
|
||||
return;
|
||||
}
|
||||
// kein Stärke-Parameter → normales Kamera-Scroll
|
||||
}
|
||||
if (e.isControlDown()) { steps *= 10; }
|
||||
input.scrollAccum.addAndGet(steps);
|
||||
});
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user