Ejemplo n.º 1
0
 public ButtonNinepatchHandler(Actor actor, NinepatchSheet hoverSheet, NinepatchSheet pressedSheet) : base(actor)
 {
     this.hoverSheet   = hoverSheet;
     this.pressedSheet = pressedSheet;
     this.clickable    = RequireComponent <Clickable>();
     this.renderer     = RequireComponent <NinepatchRenderer>();
     this.defaultSheet = this.renderer.Sheet;
 }
Ejemplo n.º 2
0
        public SwapNinepatchOnHover(Actor actor, NinepatchSheet hoverSheet) : base(actor)
        {
            this.renderer    = RequireComponent <NinepatchRenderer>();
            this.hoverable   = RequireComponent <Hoverable>();
            this.normalSheet = this.renderer.Sheet;
            this.hoverSheet  = hoverSheet;

            this.hoverable.OnHoverStart += OnHoverStart;
            this.hoverable.OnHoverEnd   += OnHoverEnd;
        }