_begin refactor, windows fixes
Some checks are pending
Build Android / Game (Android, Release ARM64) (push) Waiting to run
Build iOS / Game (iOS, Release ARM64) (push) Waiting to run
Build Linux / Editor (Linux, Development x64) (push) Waiting to run
Build Linux / Game (Linux, Release x64) (push) Waiting to run
Build macOS / Editor (Mac, Development ARM64) (push) Waiting to run
Build macOS / Game (Mac, Release ARM64) (push) Waiting to run
Build Windows / Editor (Windows, Development x64) (push) Waiting to run
Build Windows / Game (Windows, Release x64) (push) Waiting to run
Cooker / Cook (Mac) (push) Waiting to run
Tests / Tests (Linux) (push) Waiting to run
Tests / Tests (Windows) (push) Waiting to run

This commit is contained in:
2025-01-01 02:05:15 +02:00
parent aac2920f03
commit 5274a96a42
5 changed files with 224 additions and 106 deletions

View File

@@ -114,6 +114,7 @@ namespace FlaxEngine.GUI
Visible = true;
_window.Show();
_showTarget.OnTooltipShown(this);
once = true;
}
/// <summary>
@@ -204,7 +205,7 @@ namespace FlaxEngine.GUI
var rightBottomLocationSS = locationSS + dpiSize;
// Prioritize tooltip placement within parent window, fall back to virtual desktop
if (rightBottomMonitorBounds.Y < rightBottomLocationSS.Y)
/*if (rightBottomMonitorBounds.Y < rightBottomLocationSS.Y)
{
// Direction: up
locationSS.Y -= dpiSize.Y + flipOffset;
@@ -213,9 +214,11 @@ namespace FlaxEngine.GUI
{
// Direction: left
locationSS.X -= dpiSize.X + flipOffset * 2;
}
}*/
}
bool once = true;
/// <inheritdoc />
public override void Update(float deltaTime)
{
@@ -226,7 +229,18 @@ namespace FlaxEngine.GUI
// Auto hide if mouse leaves control area
Hide();
}
else //if (false)
else if (true)
{
if (_window)
_window.Position = _window.Position;
if (once)
{
once = false;
_window.ClientSize = _window.ClientSize + new Float2(2, 2);
}
}
else if (false)
{
// Position tooltip when mouse moves
WrapPosition(ref mousePos, 10);