コード例 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            _mouseCursor             = new MouseCursor();
            _lineManager             = new LineManager(_mouseCursor);
            _jointManager            = new JointManager(_mouseCursor, _lineManager);
            _markingRectangleManager = new MarkingRectangleManager(_mouseCursor, _jointManager);

            _sfFont = Content.Load <SpriteFont>("SF");

            _background = ColorManager.GetColorFromHex(ConfigurationManager.AppSettings["BackgroundColor"]);
            _foreground = ColorManager.GetColorFromHex(ConfigurationManager.AppSettings["ForegroundColor"]);
        }
コード例 #2
0
 public MarkingRectangleManager(MouseCursor cursor, JointManager jointManager)
 {
     _cursor       = cursor;
     _jointManager = jointManager;
 }
コード例 #3
0
ファイル: JointManager.cs プロジェクト: Jeern/StickFigure
 public bool IsWithinDrawArea(MouseCursor cursor)
 {
     return(IsWithinDrawArea(cursor.Position));
 }
コード例 #4
0
ファイル: JointManager.cs プロジェクト: Jeern/StickFigure
 public bool IsTouching(MouseCursor cursor)
 {
     return(GetFirstTouching(cursor) != null);
 }
コード例 #5
0
 public LineManager(MouseCursor mouseCursor)
 {
     _mouseCursor = mouseCursor;
     Lines        = new List <Line>();
 }