示例#1
0
            internal Selector(
                GameObject gameObject,
                HC.ReactorId pieceId,
                RectTransform rectTransform,
                CanvasRenderer canvasRenderer,

                ScrollRect scrollRect,
                RectMask2D rectMask2,
                GridLayoutGroup gridLayout,
                ContentSizeFitter contentSize,

                Image vScrollbarImage,
                Scrollbar vScrollbar,
                Image vScrollbarHandleImage,

                Image hScrollbarImage,
                Scrollbar hScrollbar,
                Image hScrollbarHandleImage

                ) : base(gameObject, pieceId, rectTransform, canvasRenderer)
            {
                this.scrollRect  = scrollRect;
                this.rectMask2   = rectMask2;
                this.gridLayout  = gridLayout;
                this.contentSize = contentSize;

                this.vScrollbarImage       = vScrollbarImage;
                this.vScrollbar            = vScrollbar;
                this.vScrollbarHandleImage = vScrollbarHandleImage;

                this.hScrollbarImage       = hScrollbarImage;
                this.hScrollbar            = hScrollbar;
                this.hScrollbarHandleImage = hScrollbarHandleImage;
            }
示例#2
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform
     ) : base(gameObject, pieceId, rectTransform)
 {
 }
示例#3
0
        internal HC.ReactorId Set(HC.ReactorId c)
        {
            c.id        = id;
            c.className = className;

            return(c);
        }
示例#4
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     HC.MultiToggle multiToggle
     ) : base(gameObject, pieceId, rectTransform)
 {
     this.multiToggle = multiToggle;
 }
示例#5
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     CanvasRenderer canvasRenderer,
     Image image
     ) : base(gameObject, pieceId, rectTransform, canvasRenderer)
 {
     this.image = image;
 }
示例#6
0
 public Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     CanvasRenderer canvasRenderer,
     Text textCmp
     ) : base(gameObject, pieceId, rectTransform, canvasRenderer)
 {
     this.textCmp = textCmp;
 }
示例#7
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     Slider slider,
     Image backImage,
     Image fillImage
     ) : base(gameObject, pieceId, rectTransform)
 {
     this.slider    = slider;
     this.backImage = backImage;
     this.fillImage = fillImage;
 }
示例#8
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     CanvasRenderer canvasRenderer,
     Text textCmp, Button button,
     Image image
     ) : base(gameObject, pieceId, rectTransform, canvasRenderer)
 {
     this.button  = button;
     this.image   = image;
     this.textCmp = textCmp;
 }
示例#9
0
        /// <summary>
        /// Create a new gameobject with all properties and comonents, and destroy the old one
        /// </summary>
        /// <param name="parent">Parent gameobject</param>
        protected virtual void CreateRoot(GameObject parent)
        {
            // Check if the gameObject exist and delete it to draw again, but save childNumber
            var siblingIndex = -1;

            if (gameObject != null)
            {
                isDisabled = !gameObject.activeSelf;
                if (gameObject.transform.parent != null)
                {
                    siblingIndex = gameObject.transform.GetSiblingIndex();
                }
                UnityEngine.Object.DestroyImmediate(gameObject);
            }

            // Crate the gameObject
            if (gameObject == null)
            {
                gameObject = new GameObject();
            }

            // Set the name, layer and tag
            PropsGameObject().SetNameLayerAndTag(gameObject);

            // Set the parent if exist
            this.parent = parent;
            if (parent != null)
            {
                gameObject.transform.SetParent(parent.transform);
            }

            // Set the childNumber if necesary
            if (siblingIndex >= 0)
            {
                try
                {
                    gameObject.transform.SetSiblingIndex(siblingIndex);
                }
                catch (Exception)
                {
                }
            }

            // Add rectTransform and components
            var propsRectT = PropsRectTransform();

            rectTransformCmp = propsRectT.SetOrSearchByWidthAndHeight(gameObject);
            SetRealSize(propsRectT);
            idCmp = PropsId().Set(gameObject);
            idCmp.SetElementType(elementType);
        }
示例#10
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     Canvas canvas,
     CanvasScaler canvasScaler,
     GraphicRaycaster graphicRaycaster,
     CanvasGroup canvasGroup
     ) : base(gameObject, pieceId, rectTransform)
 {
     this.canvas           = canvas;
     this.canvasScaler     = canvasScaler;
     this.graphicRaycaster = graphicRaycaster;
     this.canvasGroup      = canvasGroup;
 }
示例#11
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     Toggle toggle,
     Image backImage,
     Image checkImage,
     Text text,
     HC.MultiToggleMember multiToggleMember
     ) : base(gameObject, pieceId, rectTransform)
 {
     this.toggle            = toggle;
     this.backImage         = backImage;
     this.checkImage        = checkImage;
     this.text              = text;
     this.multiToggleMember = multiToggleMember;
 }
示例#12
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     CanvasRenderer canvasRenderer,
     // Extra
     InputField inputField,
     Image backImage,
     Text placeholderText,
     Text text
     ) : base(gameObject, pieceId, rectTransform, canvasRenderer)
 {
     this.inputField      = inputField;
     this.backImage       = backImage;
     this.placeholderText = placeholderText;
     this.text            = text;
 }
示例#13
0
 internal Selector(
     GameObject gameObject,
     HC.ReactorId pieceId,
     RectTransform rectTransform,
     CanvasRenderer canvasRenderer,
     // Extra
     Dropdown dropdown,
     Image dropdownImage,
     Text labelText,
     Image arrowImage,
     Image templateImage,
     ScrollRect scrollRect,
     Image viewportImage,
     Mask mask,
     Toggle toggle,
     Image itemBackImage,
     Image itemCheckImage,
     Text itemLabelText,
     Image scrollbarImage,
     Scrollbar scrollbar,
     Image scrollbarHandleImage
     ) : base(gameObject, pieceId, rectTransform, canvasRenderer)
 {
     this.dropdown             = dropdown;
     this.dropdownImage        = dropdownImage;
     this.labelText            = labelText;
     this.arrowImage           = arrowImage;
     this.templateImage        = templateImage;
     this.scrollRect           = scrollRect;
     this.viewportImage        = viewportImage;
     this.mask                 = mask;
     this.toggle               = toggle;
     this.itemBackImage        = itemBackImage;
     this.itemCheckImage       = itemCheckImage;
     this.itemLabelText        = itemLabelText;
     this.scrollbarImage       = scrollbarImage;
     this.scrollbar            = scrollbar;
     this.scrollbarHandleImage = scrollbarHandleImage;
 }
示例#14
0
        }                                                           // By constructor new RErendererSelector(xxx)

        internal RErendererSelector(GameObject gameObject, HC.ReactorId pieceId, RectTransform rectTransform, CanvasRenderer canvasRenderer) : base(gameObject, pieceId, rectTransform)
        {
            this.canvasRenderer = canvasRenderer;
        }
示例#15
0
 internal REbaseSelector(GameObject gameObject, HC.ReactorId pieceId, RectTransform rectTransform)
 {
     this.gameObject    = gameObject;
     this.elementId     = pieceId;
     this.rectTransform = rectTransform;
 }