1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-05-31 12:23:38 +02:00

fixed tooltip distance from the mouse changing with scale

This commit is contained in:
Ell 2020-11-17 21:05:48 +01:00
parent 6c3e9116ff
commit c4114c73f8
2 changed files with 2 additions and 2 deletions

View file

@ -79,7 +79,7 @@ namespace MLEM.Ui.Elements {
/// </summary>
public void SnapPositionToMouse() {
var viewport = this.System.Viewport.Size;
var offset = this.Input.MousePosition.ToVector2() / this.Scale + this.MouseOffset;
var offset = (this.Input.MousePosition.ToVector2() + this.MouseOffset.Value) / this.Scale;
if (offset.X < 0)
offset.X = 0;
if (offset.Y < 0)

View file

@ -32,7 +32,7 @@ namespace MLEM.Ui.Style {
this.RadioHoveredColor = Color.LightGray;
this.RadioCheckmark = batch.GenerateTexture(Color.CornflowerBlue).Region;
this.TooltipBackground = batch.GenerateTexture(Color.Black * 0.65F, Color.Black * 0.65F);
this.TooltipOffset = new Vector2(2, 3);
this.TooltipOffset = new Vector2(8, 16);
this.ProgressBarTexture = batch.GenerateTexture(Color.RoyalBlue);
this.ProgressBarColor = Color.White;
this.ProgressBarProgressPadding = new Vector2(1);