Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' GTA.Graphics
- Public Function GetRadarRectangle(Scaling As FontScaling) As RectangleF
- Dim num As Single = CSng(AddressOf Game.Resolution.Width)
- Dim num2 As Single = CSng(AddressOf Game.Resolution.Height)
- Dim num3 As Single = Math.Min(num * 0.156F, CSng((CDec(num2) * 0.20000000298023224)))
- Dim result As RectangleF = Nothing
- Dim width As Single
- If FontScaling.Pixel = Scaling Then
- width = num3
- Else
- If Scaling <> FontScaling.FontSize Then
- If Scaling <> FontScaling.ScreenUnits Then
- width = num3
- Else
- width = Graphics.ConvertPixelToUnitsX(num3)
- End If
- Else
- width = Graphics.ConvertPixelToFontX(num3)
- End If End If
- result.Width = width
- Dim height As Single
- If FontScaling.Pixel = Scaling Then
- height = num3
- Else
- If Scaling <> FontScaling.FontSize Then
- If Scaling <> FontScaling.ScreenUnits Then
- height = num3
- Else
- height = Graphics.ConvertPixelToUnitsY(num3)
- End If
- Else
- height = Graphics.ConvertPixelToFontY(num3)
- End If End If
- result.Height = height
- result.X = CSng((CDec(result.Width) * 0.44999998807907104))
- Dim resolution As Size = AddressOf Game.Resolution
- Dim resolution2 As Size = AddressOf Game.Resolution
- If resolution.Width >= resolution2.Height Then
- Dim y As Single
- If FontScaling.ScreenUnits = Scaling Then
- y = 0.75F
- Else
- If Scaling <> FontScaling.FontSize Then
- If Scaling <> FontScaling.Pixel Then
- y = 0.75F
- Else
- y = Graphics.ConvertUnitsToPixelY(0.75F)
- End If
- Else
- y = 15F
- End If End If
- result.Y = y
- Else
- Dim num4 As Single = CSng((CDec(num2) - CDec(num3) - CDec(num2) * 0.05000000074505806))
- Dim y2 As Single
- If FontScaling.Pixel = Scaling Then
- y2 = num4
- Else
- If Scaling <> FontScaling.FontSize Then
- If Scaling <> FontScaling.ScreenUnits Then
- y2 = num4
- Else
- y2 = Graphics.ConvertPixelToUnitsY(num4)
- End If
- Else
- y2 = Graphics.ConvertPixelToFontY(num4)
- End If End If
- result.Y = y2
- End If
- Return result
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement