Add **UI Control gizmo for editing UIs**

This commit is contained in:
Wojtek Figat
2024-03-16 22:00:40 +01:00
parent 8d149b94f1
commit c60244878d
15 changed files with 871 additions and 222 deletions

View File

@@ -64,7 +64,11 @@ namespace FlaxEditor.Surface
/// </summary>
protected virtual void DrawBackground()
{
var background = Style.Background;
DrawBackgroundDefault(Style.Background, Width, Height);
}
internal static void DrawBackgroundDefault(Texture background, float width, float height)
{
if (background && background.ResidentMipLevels > 0)
{
var bSize = background.Size;
@@ -77,8 +81,8 @@ namespace FlaxEditor.Surface
if (pos.Y > 0)
pos.Y -= bh;
int maxI = Mathf.CeilToInt(Width / bw + 1.0f);
int maxJ = Mathf.CeilToInt(Height / bh + 1.0f);
int maxI = Mathf.CeilToInt(width / bw + 1.0f);
int maxJ = Mathf.CeilToInt(height / bh + 1.0f);
for (int i = 0; i < maxI; i++)
{