mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 22:10:17 +00:00
adapt Utilities to high screen density
This commit is contained in:
parent
891ab1c719
commit
47cdbeda11
1 changed files with 7 additions and 1 deletions
|
@ -23,7 +23,13 @@ namespace SanAndreasUnity.UI {
|
|||
|
||||
// adjust rect
|
||||
float width = 240;
|
||||
this.windowRect = new Rect(Screen.width / 2 - width / 2, 10, width, 210);
|
||||
if (Utilities.F.ScreenHasHighDensity)
|
||||
{
|
||||
width *= 1.33f;
|
||||
width = Mathf.Min(width, Screen.width * 0.3f);
|
||||
}
|
||||
float height = width * 0.9f;
|
||||
this.windowRect = new Rect(Screen.width / 2 - width / 2, 10, width, height);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue