only show comment edit buttons when surface can be edited

This commit is contained in:
Saas
2025-10-31 20:47:23 +01:00
parent 594c0fb8e7
commit 1091bc6e2c

View File

@@ -214,6 +214,8 @@ namespace FlaxEditor.Surface
if (!_isRenaming)
Render2D.DrawText(style.FontLarge, Title, _headerRect, style.Foreground, TextAlignment.Center, TextAlignment.Center);
if (Surface.CanEdit)
{
// Close button
Render2D.DrawSprite(style.Cross, _closeButtonRect, _closeButtonRect.Contains(_mousePosition) && Surface.CanEdit ? style.Foreground : style.ForegroundGrey);
@@ -230,6 +232,7 @@ namespace FlaxEditor.Surface
// Resize button
Render2D.DrawSprite(style.Scale, _resizeButtonRect, _resizeButtonRect.Contains(_mousePosition) && Surface.CanEdit ? style.Foreground : style.ForegroundGrey);
}
// Selection outline
if (_isSelected)