[Inject] public virtual void Inject(CanvasResizer canvasResizer) { CanvasResizer = canvasResizer; Slider.value = CanvasResizer.ResizeValue01; currentResizeValue = CanvasResizer.ResizeValue01; Slider.onValueChanged.AddListener(SliderValueChanged); }
public virtual void Inject(CanvasResizer resizer) { Text = GetComponent <TMP_Text>(); defaultFontSize = Text.fontSize; Resizer = resizer; Resizer.Resized += Resized; Resized(Resizer.ResizeValue); }
public virtual void Inject(CanvasResizer resizer) { LayoutElement = GetComponent <LayoutElement>(); defaultMinWidth = LayoutElement.minWidth; defaultPreferredWidth = LayoutElement.preferredWidth; defaultMinHeight = LayoutElement.minHeight; defaultPreferredHeight = LayoutElement.preferredHeight; Resizer = resizer; Resized(Resizer.ResizeValue); }
public virtual void Inject(CanvasResizer resizer) { LayoutGroup = GetComponent <HorizontalOrVerticalLayoutGroup>(); defaultLeft = LayoutGroup.padding.left; defaultRight = LayoutGroup.padding.right; defaultTop = LayoutGroup.padding.top; defaultBottom = LayoutGroup.padding.bottom; defaultSpacing = LayoutGroup.spacing; Resizer = resizer; Resized(Resizer.ResizeValue); }