change terrain brush size with scroll
This commit is contained in:
@@ -150,6 +150,14 @@ namespace FlaxEditor.Tools.Terrain
|
||||
return;
|
||||
}
|
||||
|
||||
// Increase or decrease brush size with scroll
|
||||
if (Input.GetKey(KeyboardKeys.Shift))
|
||||
{
|
||||
var currentBrush = Mode.CurrentBrush;
|
||||
currentBrush.Size += dt * currentBrush.Size * Input.Mouse.ScrollDelta * 5f;
|
||||
Mode.CurrentBrush = currentBrush;
|
||||
}
|
||||
|
||||
// Check if no terrain is selected
|
||||
var terrain = SelectedTerrain;
|
||||
if (!terrain)
|
||||
|
||||
@@ -139,9 +139,9 @@ namespace FlaxEditor.Tools.Terrain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current brush.
|
||||
/// Gets or set the current brush.
|
||||
/// </summary>
|
||||
public Brush CurrentBrush => _brushes[(int)_brushType];
|
||||
public Brush CurrentBrush { get => _brushes[(int)_brushType]; set => _brushes[(int)_brushType] = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the circle brush instance.
|
||||
|
||||
@@ -158,6 +158,14 @@ namespace FlaxEditor.Tools.Terrain
|
||||
return;
|
||||
}
|
||||
|
||||
// Increase or decrease brush size with scroll
|
||||
if (Input.GetKey(KeyboardKeys.Shift))
|
||||
{
|
||||
var currentBrush = Mode.CurrentBrush;
|
||||
currentBrush.Size += dt * currentBrush.Size * Input.Mouse.ScrollDelta * 5f;
|
||||
Mode.CurrentBrush = currentBrush;
|
||||
}
|
||||
|
||||
// Check if selected terrain was changed during painting
|
||||
if (terrain != _paintTerrain && IsPainting)
|
||||
{
|
||||
|
||||
@@ -158,9 +158,9 @@ namespace FlaxEditor.Tools.Terrain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current brush.
|
||||
/// Gets or set the current brush.
|
||||
/// </summary>
|
||||
public Brush CurrentBrush => _brushes[(int)_brushType];
|
||||
public Brush CurrentBrush { get => _brushes[(int)_brushType]; set => _brushes[(int)_brushType] = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the circle brush instance.
|
||||
|
||||
Reference in New Issue
Block a user