Skip to content

Commit 3fbecde

Browse files
committed
Fixed glare position
1 parent 062b203 commit 3fbecde

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

NativeUI/UIMenu.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,14 +1889,15 @@ public async Task Draw()
18891889
_mainMenu.Draw();
18901890
if (Glare)
18911891
{
1892-
float x;
1893-
float y;
1894-
float width = 1.0f;
1895-
float height = 1.042f;
1896-
x = BannerSprite.Position.X / 1920 + Safe.X / 53.211f + 0.4485f;
1897-
y = BannerSprite.Position.Y / 1080 + Safe.Y / 33.195020746888f + 0.468f;
1898-
_menuGlare.CallFunction("SET_DATA_SLOT", API.GetGameplayCamRelativeHeading());
1899-
API.DrawScaleformMovie(_menuGlare.Handle, x, y, width, height, 255, 255, 255, 255, 0);
1892+
_menuGlare.CallFunction("SET_DATA_SLOT", GameplayCamera.RelativeHeading);
1893+
var res = ScreenTools.ResolutionMaintainRatio;
1894+
SizeF _glareSize = new SizeF(1.0f, 1.054f);
1895+
PointF gl = new PointF(
1896+
(Offset.X / res.Width) + 0.4491f,
1897+
(Offset.Y / res.Height) + 0.475f
1898+
);
1899+
1900+
API.DrawScaleformMovie(_menuGlare.Handle, gl.X, gl.Y, _glareSize.Width, _glareSize.Height, 255, 255, 255, 255, 0);
19001901
}
19011902
if (MenuItems.Count == 0 && Windows.Count == 0)
19021903
{

0 commit comments

Comments
 (0)