Ejemplo n.º 1
0
        public UiTab(GraphicsDevice graphicDev, SpriteFont Font, int TabNumber, string TabID, string TabName, Color TabColor, Vector2 TabSize)
        {
            tabNumber = TabNumber;

            //create Button for Tab
            tabButton = new UiButton(graphicDev, Font, Vector2.Zero, TabSize, TabColor, TabID, true);
            UiButtonMessenger.RegisterButton(tabButton);
            tabButton.ScaleBox    = false;
            tabButton.isTabButton = true;
            Initilise(TabName);
        }
Ejemplo n.º 2
0
        private void SwitchPageListeners()
        {
            foreach (UiTab Tab in tabList)
            {
                if (Tab.tabNumber != currentSelection)
                {
                    foreach (UiButton Button in Tab.ButtonList)
                    {
                        Button.SetButtonState = UiButton.UiButtonStates.Button_Up;
                        UiButtonMessenger.RemoveButton(Button.GetButtonID);
                    }
                }

                else if (Tab.tabNumber == currentSelection)
                {
                    foreach (UiButton Button in Tab.ButtonList)
                    {
                        UiButtonMessenger.RegisterButton(Button);
                    }
                }
            }
        }