コード例 #1
0
        public UIComponentGroup AddUIComponent(UIComponent component)
        {
            m_componentIdDictionary.Add(component.Id, component);
            m_componentNameDictionary.Add(component.Name, component);
            m_listComponent.AddLast(component);

            component.SetParentComponentGroup(this);

            return this;
        }
コード例 #2
0
        public UIGridLayout AddUIComponent(UIComponent component, int xSlot, int ySlot, int xSlotWidth, int ySlotHeight)
        {
            //			float xGridSlotStart = 1f / m_xGridSections * xSlot;
            //			float yGridSlotStart = 1f / m_yGridSections * (m_yGridSections - ySlot - 1);
            //			float xGridSlotWidth = 1f / m_xGridSections * xSlotWidth;
            //			float yGridSlotHeight = 1f / m_yGridSections * ySlotHeight;
            //			UIRelativeLayout gridSlotLayout = new UIRelativeLayout(xGridSlotStart, yGridSlotStart, xGridSlotWidth, yGridSlotHeight, this, UIAnchorLocation.LEFT_BOT);

            float xGridSlotStart = 1f / m_xGridSections * xSlot;
            float yGridSlotStart = 1f / m_yGridSections * (m_yGridSections - ySlot);
            float xGridSlotWidth = 1f / (float)m_xGridSections * xSlotWidth;
            float yGridSlotHeight = 1f / (float)m_yGridSections * ySlotHeight;
            UIRelativeLayout gridSlotLayout = new UIRelativeLayout(xGridSlotStart, yGridSlotStart, xGridSlotWidth, yGridSlotHeight, this, UIAnchorLocation.LEFT_TOP);

            gridSlotLayout.AddUIComponent(component);

            base.AddUIComponent(gridSlotLayout);

            UIGridLayoutSlot gridSlot = new UIGridLayoutSlot(xSlot, ySlot, xSlotWidth, ySlotHeight);
            m_grid.Add(gridSlot);

            return this;
        }
コード例 #3
0
        public new UIRelativeLayout AddUIComponent(UIComponent component)
        {
            base.AddUIComponent(component);

            return this;
        }
コード例 #4
0
        public new UIStaticButton AddUIComponent(UIComponent component)
        {
            base.AddUIComponent(component);

            return this;
        }
コード例 #5
0
        public UIStaticButton SetUIComponentIdle(UIComponent component)
        {
            AddUIComponent(component);

            m_idleComponent = component;
            component.SetParentComponentGroup(this);

            return this;
        }
コード例 #6
0
        public UIStaticButton SetUIComponentHighlighted(UIComponent component)
        {
            AddUIComponent(component);

            m_highlightedComponent = component;
            component.SetParentComponentGroup(this);

            return this;
        }
コード例 #7
0
 public UIComponentGroupIteratorData(UIComponent component, int parentSlot)
 {
     this.component = component;
     this.parentSlot = parentSlot;
 }