From bb9b322580971e20633771695f82fceb096b1cca Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 22 Jul 2021 04:27:57 +0200 Subject: [PATCH] Fixed tooltips with custom text scale not snapping to the mouse correctly in their first displayed frame --- CHANGELOG.md | 1 + MLEM.Ui/Elements/Tooltip.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a611c6..821fb02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Improvements Fixes - Fixed a crash if a paragraph has a link formatting code, but no font +- Fixed tooltips with custom text scale not snapping to the mouse correctly in their first displayed frame ### MLEM.Extended Improvements diff --git a/MLEM.Ui/Elements/Tooltip.cs b/MLEM.Ui/Elements/Tooltip.cs index c3d4ad3..229c6af 100644 --- a/MLEM.Ui/Elements/Tooltip.cs +++ b/MLEM.Ui/Elements/Tooltip.cs @@ -67,6 +67,7 @@ namespace MLEM.Ui.Elements { if (this.Parent != null) throw new NotSupportedException($"A tooltip shouldn't be the child of another element ({this.Parent})"); base.ForceUpdateArea(); + this.SnapPositionToMouse(); } ///