private static void ExpandGameCreditsBox(Localizer __instance) { if (__instance.name == "tip" && __instance.transform.parent.name == "language") { var rect = __instance.GetComponent <RectTransform>(); var sizeDelta = rect.sizeDelta; sizeDelta.x = 600; sizeDelta.y = 90; rect.sizeDelta = sizeDelta; } }
public void Setup(Cocktail cocktail) { this.cocktail = cocktail; AspectRatioFitter ar = GetComponent <AspectRatioFitter>(); if (ar != null) { ar.aspectRatio = cocktail.image.rect.width / cocktail.image.rect.height; } image.sprite = cocktail.image; titleText.Localize(cocktail.nameId); tmp = titleText.GetComponent <TMP_Text>(); }