Merge remote-tracking branch 'origin/master' into 1.7
This commit is contained in:
@@ -137,14 +137,23 @@ namespace FlaxEditor.Tools.Foliage
|
||||
Offsets = Margin.Zero,
|
||||
Parent = _noFoliagePanel
|
||||
};
|
||||
|
||||
var buttonText = "Create new foliage";
|
||||
_createNewFoliage = new Button
|
||||
{
|
||||
Text = "Create new foliage",
|
||||
Text = buttonText,
|
||||
AnchorPreset = AnchorPresets.MiddleCenter,
|
||||
Offsets = new Margin(-60, 120, -12, 24),
|
||||
Parent = _noFoliagePanel,
|
||||
Enabled = false
|
||||
};
|
||||
var textSize = Style.Current.FontMedium.MeasureText(buttonText);
|
||||
if (_createNewFoliage.Width < textSize.X)
|
||||
{
|
||||
_createNewFoliage.LocalX -= (textSize.X - _createNewFoliage.Width) / 2;
|
||||
_createNewFoliage.Width = textSize.X + 6;
|
||||
}
|
||||
|
||||
_createNewFoliage.Clicked += OnCreateNewFoliageClicked;
|
||||
}
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@ namespace FlaxEditor.Tools.Foliage
|
||||
|
||||
private void OnModified()
|
||||
{
|
||||
Editor.Instance.Scene.MarkSceneEdited(_proxy.Foliage?.Scene);
|
||||
Editor.Instance.Scene.MarkSceneEdited(_proxy.Foliage != null ? _proxy.Foliage.Scene : null);
|
||||
}
|
||||
|
||||
private void OnSelectedFoliageChanged()
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace FlaxEditor.Tools.Foliage
|
||||
|
||||
private void OnModified()
|
||||
{
|
||||
Editor.Instance.Scene.MarkSceneEdited(_proxy.Foliage?.Scene);
|
||||
Editor.Instance.Scene.MarkSceneEdited(_proxy.Foliage != null ? _proxy.Foliage.Scene : null);
|
||||
}
|
||||
|
||||
private void OnSelectedFoliageChanged()
|
||||
|
||||
Reference in New Issue
Block a user