public BoxButton(Rectangle ButtonCollsionBox, SpriteFont fntText, string Text, OnOver OnOverDelegate, OnClick OnClickDelegate)
 {
     this.ButtonCollsionBox = ButtonCollsionBox;
     this.fntText           = fntText;
     this.Text            = Text;
     this.OnOverDelegate  = OnOverDelegate;
     this.OnClickDelegate = OnClickDelegate;
 }
 public DropDownButton(Rectangle ButtonCollsionBox, SpriteFont fntText, string Text, string[] Choices, OnOver OnOverDelegate, OnClick OnClickDelegate)
 {
     this.ButtonCollsionBox = ButtonCollsionBox;
     this.fntText           = fntText;
     this.SelectedItem      = Text;
     this.Choices           = Choices;
     this.OnOverDelegate    = OnOverDelegate;
     this.OnClickDelegate   = OnClickDelegate;
 }
        // The below functions are called by the VREyeRaycaster when the appropriate input is detected.
        // They in turn call the appropriate events should they have subscribers.
        public void Over()
        {
            m_IsOver = true;

            if (OnOver != null)
            {
                OnOver.Invoke();
            }
        }
Beispiel #4
0
        public static void Over()
        {
            if (!IsGameStart)
            {
                return;
            }

            IsGameStart = false;
            OnOver?.Invoke();
        }
        public InteractiveButton(Microsoft.Xna.Framework.Content.ContentManager Content, string ButtonPath, Vector2 AnimationPosition, int ImagesPerLine,
                                 OnOver OnOverDelegate, OnClick OnClickDelegate)
        {
            this.OnOverDelegate  = OnOverDelegate;
            this.OnClickDelegate = OnClickDelegate;

            Button = new AnimatedSprite(Content, ButtonPath, AnimationPosition, 0, 1, ImagesPerLine);
            Icon   = null;

            ButtonCollsionBox = Button.GetCollisionBox();
        }
 public InteractiveButton(Microsoft.Xna.Framework.Content.ContentManager Content, string ButtonPath, Vector2 AnimationPosition,
                          OnOver OnOverDelegate, OnClick OnClickDelegate)
     : this(Content, ButtonPath, AnimationPosition, 4, OnOverDelegate, OnClickDelegate)
 {
 }