Beispiel #1
0
 /// <summary>
 /// Register a button to the ListenerList. Allows the button to recieve and send updates.
 /// It wont allow the same button to be registered twice
 /// </summary>
 static public void RegisterButton(UiButton Button)
 {
     if (!ButtonListeners.Exists(item => string.Compare(item.GetButtonID, Button.GetButtonID, 0) == 0))
     {
         ButtonListeners.Add(Button);
     }
 }
Beispiel #2
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);
        }