mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-24 01:09:23 +01:00
fixed tooltip distance from the mouse changing with scale
This commit is contained in:
parent
6c3e9116ff
commit
c4114c73f8
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue