コード例 #1
0
        public UIRelativeLayout(float xStart,
		                        float yStart,
		                        float xWidth,
		                        float yHeight,
		                        UIComponentGroup parentComponentGroup,
		                        UIAnchorLocation anchorLocation)
            : this("", xStart, yStart, xWidth, yHeight, parentComponentGroup, anchorLocation)
        {
            SetName(Id.ToString());
        }
コード例 #2
0
        public UIRelativeLayout(string componentName,
		                        float xStart,
		                        float yStart,
		                        float xWidth,
		                        float yHeight,
		                        UIComponentGroup parentComponentGroup,
		                        UIAnchorLocation anchorLocation)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, UILayoutType.RELATIVE_LAYOUT, anchorLocation)
        {
            m_componentType = UIComponentType.LAYOUT;
        }
コード例 #3
0
        public UIButtonHitBox(float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIButton parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation)
        {
            m_anchor = new UIAnchor(anchorLocation, xStart, yStart, xWidth, yHeight);

            m_parentComponentGroup = parentComponentGroup;
        }
コード例 #4
0
        public UIGridLayout(float xStart,
		                    float yStart,
		                    float xWidth,
		                    float yHeight,
		                    UIComponentGroup parentComponentGroup,
		                    UIAnchorLocation anchorLocation,
		                    int xGridSections,
		                    int yGridSections)
            : this("", xStart, yStart, xWidth, yHeight, parentComponentGroup, anchorLocation, xGridSections, yGridSections)
        {
            SetName(Id.ToString());
        }
コード例 #5
0
        public UIStaticButton(float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation,
		                      IUIButtonListener buttonListener)
            : this("", xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation, buttonListener)
        {
            SetName(Id.ToString());
        }
コード例 #6
0
        public UIRenderable(string componentName,
		                    float xStart,
		                    float yStart,
		                    float xWidth,
		                    float yHeight,
		                    UIComponentGroup parentComponentGroup,
		                    UILayoutType layoutType,
		                    UIAnchorLocation anchorLocation)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_componentType = UIComponentType.RENDERABLE;
        }
コード例 #7
0
        public UITextureLabel(float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation,
		                      Texture2D texture2D)
            : this("", xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation, texture2D)
        {
            SetName(Id.ToString());
        }
コード例 #8
0
        public UIStaticButton(string componentName,
		                      float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation,
		                      IUIButtonListener buttonListener)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation, buttonListener)
        {
            m_hitBox = new UIButtonHitBox(xStart, yStart, xWidth, yHeight, this, layoutType, anchorLocation);
        }
コード例 #9
0
        protected UIComponentGroup(string componentName,
		                           float xStart,
		                           float yStart,
		                           float xWidth,
		                           float yHeight,
		                           UIComponentGroup parentComponentGroup,
		                           UILayoutType layoutType,
		                           UIAnchorLocation anchorLocation)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_componentIdDictionary = new HybridDictionary();
            m_componentNameDictionary = new HybridDictionary();
            m_listComponent = new LinkedList<UIComponent>();
        }
コード例 #10
0
        public UITextureLabel(string componentName,
		                      float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation,
		                      Texture2D texture2D)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_texture2D = texture2D;
            m_guiStyle = new GUIStyle();
        }
コード例 #11
0
        public UIStringLabel(string componentName,
		                     float xStart,
		                     float yStart,
		                     float xWidth,
		                     float yHeight,
		                     UIComponentGroup parentComponentGroup,
		                     UILayoutType layoutType,
		                     UIAnchorLocation anchorLocation,
		                     UITextInfo textInfo,
		                     string text)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_guiStyle = textInfo.GetGUIStyle();
            m_textInfo = textInfo;
            m_text = text;
        }
コード例 #12
0
        public UIGridLayout(string componentName,
		                    float xStart,
		                    float yStart,
		                    float xWidth,
		                    float yHeight,
		                    UIComponentGroup parentComponentGroup,
		                    UIAnchorLocation anchorLocation,
		                    int xGridSections,
		                    int yGridSections)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, anchorLocation)
        {
            m_xGridSections = xGridSections;
            m_yGridSections = yGridSections;

            m_grid = new ArrayList(xGridSections * yGridSections);
        }
コード例 #13
0
        protected UIComponent(string componentName,
		                      float xStart,
		                      float yStart,
		                      float xWidth,
		                      float yHeight,
		                      UIComponentGroup parentComponentGroup,
		                      UILayoutType layoutType,
		                      UIAnchorLocation anchorLocation)
        {
            m_componentId = UI.GenerateId();
            m_componentName = componentName;

            m_anchor = new UIAnchor(anchorLocation, xStart, yStart, xWidth, yHeight);
            m_layoutType = layoutType;
            m_parentComponentGroup = parentComponentGroup;
        }
コード例 #14
0
        public UIButton(string componentName,
		                float xStart,
		                float yStart,
		                float xWidth,
		                float yHeight,
		                UIComponentGroup parentComponentGroup,
		                UILayoutType layoutType,
		                UIAnchorLocation anchorLocation,
		                IUIButtonListener buttonListener)
            : base(componentName, xStart, yStart, xWidth, yHeight, parentComponentGroup, layoutType, anchorLocation)
        {
            m_componentType = UIComponentType.BUTTON;
            if (null == buttonListener)
                m_buttonListener = new UIButtonListenerDoNothing();
            else
                m_buttonListener = buttonListener;
        }
コード例 #15
0
 public UITextInfo SetTextAlignment(UIAnchorLocation textAnchor)
 {
     m_uiTextAnchor = textAnchor;
     switch (textAnchor)
     {
     case UIAnchorLocation.LEFT_TOP:
         m_textAnchor = TextAnchor.UpperLeft;
         break;
     case UIAnchorLocation.LEFT_MID:
         m_textAnchor = TextAnchor.MiddleLeft;
         break;
     case UIAnchorLocation.LEFT_BOT:
         m_textAnchor = TextAnchor.LowerLeft;
         break;
     case UIAnchorLocation.MID_TOP:
         m_textAnchor = TextAnchor.UpperCenter;
         break;
     case UIAnchorLocation.CENTER:
         m_textAnchor = TextAnchor.MiddleCenter;
         break;
     case UIAnchorLocation.MID_BOT:
         m_textAnchor = TextAnchor.LowerCenter;
         break;
     case UIAnchorLocation.RIGHT_TOP:
         m_textAnchor = TextAnchor.UpperRight;
         break;
     case UIAnchorLocation.RIGHT_MID:
         m_textAnchor = TextAnchor.MiddleRight;
         break;
     case UIAnchorLocation.RIGHT_BOT:
         m_textAnchor = TextAnchor.LowerRight;
         break;
     }
     m_guiStyle.alignment = m_textAnchor;
     return this;
 }
コード例 #16
0
        public UIAnchor(UIAnchorLocation anchorLocation, float xStart, float yStart, float xWidth, float yHeight)
        {
            switch (anchorLocation)
            {
            case UIAnchorLocation.LEFT_TOP:
                relativeXLeft = XLeft_AnchorLeft;
                relativeXRight = XRight_AnchorLeft;
                relativeYBottom = YBottom_AnchorTop;
                relativeYTop = YTop_AnchorTop;
                break;
            case UIAnchorLocation.LEFT_MID:
                relativeXLeft = XLeft_AnchorLeft;
                relativeXRight = XRight_AnchorLeft;
                relativeYBottom = YBottom_AnchorMid;
                relativeYTop = YTop_AnchorMid;
                break;
            case UIAnchorLocation.LEFT_BOT:
                relativeXLeft = XLeft_AnchorLeft;
                relativeXRight = XRight_AnchorLeft;
                relativeYBottom = YBottom_AnchorBottom;
                relativeYTop = YTop_AnchorBottom;
                break;
            case UIAnchorLocation.MID_TOP:
                relativeXLeft = XLeft_AnchorMid;
                relativeXRight = XRight_AnchorMid;
                relativeYBottom = YBottom_AnchorTop;
                relativeYTop = YTop_AnchorTop;
                break;
            case UIAnchorLocation.CENTER:
                relativeXLeft = XLeft_AnchorMid;
                relativeXRight = XRight_AnchorMid;
                relativeYBottom = YBottom_AnchorMid;
                relativeYTop = YTop_AnchorMid;
                break;
            case UIAnchorLocation.MID_BOT:
                relativeXLeft = XLeft_AnchorMid;
                relativeXRight = XRight_AnchorMid;
                relativeYBottom = YBottom_AnchorBottom;
                relativeYTop = YTop_AnchorBottom;
                break;
            case UIAnchorLocation.RIGHT_TOP:
                relativeXLeft = XLeft_AnchorRight;
                relativeXRight = XRight_AnchorRight;
                relativeYBottom = YBottom_AnchorTop;
                relativeYTop = YTop_AnchorTop;
                break;
            case UIAnchorLocation.RIGHT_MID:
                relativeXLeft = XLeft_AnchorRight;
                relativeXRight = XRight_AnchorRight;
                relativeYBottom = YBottom_AnchorMid;
                relativeYTop = YTop_AnchorMid;
                break;
            case UIAnchorLocation.RIGHT_BOT:
                relativeXLeft = XLeft_AnchorRight;
                relativeXRight = XRight_AnchorRight;
                relativeYBottom = YBottom_AnchorBottom;
                relativeYTop = YTop_AnchorBottom;
                break;
            }

            m_xStart = xStart;
            m_yStart = yStart;
            m_xWidth = xWidth;
            m_yHeight = yHeight;
        }