|
|
|
@ -7,8 +7,8 @@ public partial class TerrainEditingControls |
|
|
|
|
public Slider DrawSizeSlider { get; private set; } |
|
|
|
|
public Button[] PaintTextureButtons { get; private set; } |
|
|
|
|
|
|
|
|
|
public Button UpDownToggle { get; private set; } |
|
|
|
|
public Button ConnectedToggle { get; private set; } |
|
|
|
|
public Button RaiseLowerToggle { get; private set; } |
|
|
|
|
public Button ConnectedToggle { get; private set; } |
|
|
|
|
|
|
|
|
|
public ToolMode ToolMode { get => GetToolMode (); set => SetToolMode (value); } |
|
|
|
|
public ToolShape ToolShape { get => GetToolShape(); set => SetToolShape(value); } |
|
|
|
@ -44,12 +44,12 @@ public partial class TerrainEditingControls |
|
|
|
|
foreach (var (i, button) in PaintTextureButtons.Select((b, i) => (i, b))) |
|
|
|
|
button.Pressed += () => SetTexture(i + 1); |
|
|
|
|
|
|
|
|
|
var drawSizeLabel = GetNode<Label>("SizeLabel"); |
|
|
|
|
DrawSizeSlider = GetNode<Slider>("SizeSlider"); |
|
|
|
|
var drawSizeLabel = GetNode<Label> ("SizeLabel"); |
|
|
|
|
DrawSizeSlider = GetNode<Slider>("SizeSlider"); |
|
|
|
|
DrawSizeSlider.ValueChanged += (_) => drawSizeLabel.Text = $"{DrawSize}"; |
|
|
|
|
|
|
|
|
|
UpDownToggle = GetNode<Button>("UpDown"); |
|
|
|
|
ConnectedToggle = GetNode<Button>("Connected"); |
|
|
|
|
RaiseLowerToggle = GetNode<Button>("RaiseLower"); |
|
|
|
|
ConnectedToggle = GetNode<Button>("Connected"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ToolMode GetToolMode() |
|
|
|
@ -67,7 +67,7 @@ public partial class TerrainEditingControls |
|
|
|
|
ToolShapeButtons[0].Item2.Icon = (value != ToolMode.Paint) |
|
|
|
|
? CornerTextureNormal : CornerTexturePaint; |
|
|
|
|
|
|
|
|
|
UpDownToggle.Disabled = value is ToolMode.Flatten or ToolMode.Paint; |
|
|
|
|
RaiseLowerToggle.Disabled = value is ToolMode.Flatten or ToolMode.Paint; |
|
|
|
|
ConnectedToggle.Disabled = value is ToolMode.Paint; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|