mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-25 01:39:23 +01:00
Fixed paragraph links having incorrect hover locations when using special text alignments
This commit is contained in:
parent
6e75e9ebb4
commit
68fc02b170
2 changed files with 7 additions and 1 deletions
|
@ -25,6 +25,9 @@ Improvements
|
|||
- Allow for checkboxes and radio buttons to be disabled
|
||||
- Only set a paragraph's area dirty when a text change would cause it to change size
|
||||
|
||||
Fixes
|
||||
- Fixed paragraph links having incorrect hover locations when using special text alignments
|
||||
|
||||
### MLEM.Data
|
||||
Improvements
|
||||
- Rethrow exceptions when no RawContentManager readers could be constructed
|
||||
|
|
|
@ -266,7 +266,10 @@ namespace MLEM.Ui.Elements {
|
|||
if (ret != null)
|
||||
return ret;
|
||||
// check if any of our token's parts are hovered
|
||||
foreach (var rect in this.Token.GetArea(this.Parent.DisplayArea.Location, this.Scale * this.textScale)) {
|
||||
var location = this.Parent.DisplayArea.Location;
|
||||
if (this.Parent is Paragraph p)
|
||||
location.X += p.GetAlignmentOffset();
|
||||
foreach (var rect in this.Token.GetArea(location, this.Scale * this.textScale)) {
|
||||
if (rect.Contains(this.TransformInverse(position)))
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue