Restructured for new direction.

This commit is contained in:
2026-05-12 12:01:09 +01:00
parent 0439b6c1d2
commit c203f836b1
1134 changed files with 125569 additions and 213519 deletions

View File

@@ -57,7 +57,18 @@ namespace BriarQueen.Framework.Managers.UI
private bool _useVirtualCursor;
public CursorStyleEntry CurrentStyleEntry => _styleMap[_currentStyle];
public CursorStyleEntry CurrentStyleEntry
{
get
{
if (TryGetStyleEntry(GetEffectiveStyle(), out var entry))
{
return entry;
}
return default;
}
}
[Inject]
private void Construct(EventCoordinator eventCoordinator)
@@ -192,6 +203,22 @@ namespace BriarQueen.Framework.Managers.UI
return _isStyleOverridden ? _currentStyleOverride : _currentStyle;
}
private bool TryGetStyleEntry(CursorStyle style, out CursorStyleEntry entry)
{
if (_styleMap.TryGetValue(style, out entry))
{
return true;
}
if (_styleMap.TryGetValue(CursorStyle.Default, out entry))
{
return true;
}
entry = default;
return false;
}
private void ApplyVirtualCursorStyle(CursorStyle style)
{
if (_virtualCursorImage == null)
@@ -282,4 +309,4 @@ namespace BriarQueen.Framework.Managers.UI
public Vector2 TooltipOffset;
}
}
}
}