示例#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;
        }
 public DebugIconHoverRenderer(Actor actor) : base(actor)
 {
     this.boundingRect = RequireComponent <BoundingRect>();
     this.hoverable    = RequireComponent <Hoverable>();
 }
示例#3
0
 public Draggable(Actor actor) : base(actor)
 {
     this.hoverable = RequireComponent <Hoverable>();
     IsDragging     = false;
 }
示例#4
0
 public Clickable(Actor actor) : base(actor)
 {
     this.hoverable = RequireComponent <Hoverable>();
 }