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