Ejemplo n.º 1
0
        public Scrollbar(Actor actor, BoundingRect containerBoundingRect, Camera targetCamera, MinMax <int> scrollRange,
                         NinepatchSheet thumbSheet, int scrollIncrement = 64) : base(actor)
        {
            this.myBoundingRect        = RequireComponent <BoundingRect>();
            this.hoverable             = RequireComponent <Hoverable>();
            this.containerBoundingRect = containerBoundingRect;
            this.targetCamera          = targetCamera;

            this.myBoundingRect.SetOffsetToTopLeft();

            this.worldBounds     = scrollRange;
            this.scrollIncrement = scrollIncrement;
            this.thumbSheet      = thumbSheet;
            SetScrolledUnits(0);

            this.targetCamera.OnChangeZoom += OnUpdateZoom;
        }
Ejemplo n.º 2
0
 public DebugIconHoverRenderer(Actor actor) : base(actor)
 {
     this.boundingRect = RequireComponent <BoundingRect>();
     this.hoverable    = RequireComponent <Hoverable>();
 }
Ejemplo n.º 3
0
 public Draggable(Actor actor) : base(actor)
 {
     this.hoverable = RequireComponent <Hoverable>();
     IsDragging     = false;
 }
Ejemplo n.º 4
0
 public Clickable(Actor actor) : base(actor)
 {
     this.hoverable = RequireComponent <Hoverable>();
 }