예제 #1
0
 [Inject] public virtual void Inject(CanvasResizer canvasResizer)
 {
     CanvasResizer      = canvasResizer;
     Slider.value       = CanvasResizer.ResizeValue01;
     currentResizeValue = CanvasResizer.ResizeValue01;
     Slider.onValueChanged.AddListener(SliderValueChanged);
 }
예제 #2
0
        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);
        }
예제 #4
0
        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);
        }