Merge branch 'Tryibion-cwidget-size'

This commit is contained in:
Wojtek Figat
2024-05-30 12:01:03 +02:00

View File

@@ -626,9 +626,6 @@ namespace FlaxEditor
var viewScale = ViewScale; var viewScale = ViewScale;
if (viewScale < 0.7f) if (viewScale < 0.7f)
widgetSize *= viewScale; widgetSize *= viewScale;
var controlSize = control.Size.Absolute.MinValue / 50.0f;
if (controlSize < 1.0f)
widgetSize *= Mathf.Clamp(controlSize + 0.1f, 0.1f, 1.0f);
var widgetHandleSize = new Float2(widgetSize); var widgetHandleSize = new Float2(widgetSize);
DrawControlWidget(uiControl, ref ul, ref mousePos, ref widgetHandleSize, viewScale, new Float2(-1, -1), CursorType.SizeNWSE); DrawControlWidget(uiControl, ref ul, ref mousePos, ref widgetHandleSize, viewScale, new Float2(-1, -1), CursorType.SizeNWSE);
DrawControlWidget(uiControl, ref ur, ref mousePos, ref widgetHandleSize, viewScale, new Float2(1, -1), CursorType.SizeNESW); DrawControlWidget(uiControl, ref ur, ref mousePos, ref widgetHandleSize, viewScale, new Float2(1, -1), CursorType.SizeNESW);