public ScrollThumb(Scroller owner, ScrollerStyle style) : base() { _owner = owner; _style = style; _owner.ScrollBar.OnPositionChanged += ScrollBarMoved; if (_owner.HasButtons) { _owner.ScrollUpBtn.OnClicked += ScrollUpBtnClick; _owner.ScrollDownBtn.OnClicked += ScrollDownBtnClick; } DistanceFromTop = 0; ApplyMoveCheck = MoveCheck; }
} // appears to be the correct one #endregion public static void LoadContent(ContentManager content) { Button = content.Load <Texture2D>(@"UI/Button"); ButtonHover = content.Load <Texture2D>(@"UI/ButtonHover"); ButtonPressed = content.Load <Texture2D>(@"UI/ButtonPressed"); ScrollUp = content.Load <Texture2D>(@"UI/ScrollUp"); ScrollDown = content.Load <Texture2D>(@"UI/ScrollDown"); ScrollUpHover = content.Load <Texture2D>(@"UI/ScrollUpHover"); ScrollDownHover = content.Load <Texture2D>(@"UI/ScrollDownHover"); ScrollUpPressed = content.Load <Texture2D>(@"UI/ScrollUpPressed"); ScrollDownPressed = content.Load <Texture2D>(@"UI/ScrollDownPressed"); ScrollerStyle = new ScrollerStyle(ScrollBar, ScrollThumb, ScrollThumbHover) { ScrollThumbOffset = new Vector2(4, 0), ScrollThumbWidth = 9, ScrollBarWidth = 18, ScrollUpButtonStyle = new ControlStyle( ScrollUp, ScrollUpHover, ScrollUpPressed, null, Rectangle.Empty ), ScrollDownButtonStyle = new ControlStyle( ScrollDown, ScrollDownHover, ScrollDownPressed, null, Rectangle.Empty ) }; // BGs Panel_Bg = content.Load <Texture2D>(@"UI/Panel"); Terminal_Bg = content.Load <Texture2D>(@"UI/Terminal"); Cursor = content.Load <Texture2D>(@"UI/Cursor"); DevConsole_Bg = content.Load <Texture2D>(@"UI/DevConsole"); // Fonts Font_MineCraftia11 = content.Load <BitmapFont>(@"Fonts/MineCraftia_11"); }