blob: 0c36253d3eace1c8b96a6a13f5aaa9794fb59936 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
using UnityEngine;
public class UIScaleHandler : MonoBehaviour
{
public static bool useLargeUI;
public TooltipManager tooltipManager;
public GameObject defaultTooltipParent;
public Tooltip defaultTooltip;
public GameObject largeTooltipParent;
public Tooltip largeTooltip;
public RectTransform treasureChestParent;
public RectTransform coinCountParent;
private void Start()
{
Refresh();
}
public void Refresh()
{
if (SettingsManager.Instance.UseLargeInGameUI)
{
defaultTooltipParent.SetActive(value: false);
largeTooltipParent.SetActive(value: true);
tooltipManager.targetTooltip = largeTooltip;
treasureChestParent.localScale = Vector3.one * 1.25f;
coinCountParent.localScale = Vector3.one * 1.25f;
}
else
{
defaultTooltipParent.SetActive(value: true);
largeTooltipParent.SetActive(value: false);
tooltipManager.targetTooltip = defaultTooltip;
treasureChestParent.localScale = Vector3.one;
coinCountParent.localScale = Vector3.one;
}
}
}
|