Example #1
0
        protected TouchableWidget(RectangleF space, Drawable normal, Drawable?hover = null, Drawable?press = null)
            : base(space)
        {
            NormalTexture = normal;
            _objToDraw    = NormalTexture;
            HoverTexture  = hover;
            PressTexture  = press;

            Props.AddProp(new OnEnter(StartedHovering));
            Props.AddProp(new OnExit(StoppedHovering));
            Props.AddProp(new OnPress(PressedDown));
            Props.AddProp(new OnRelease(Released));
        }