Esempio n. 1
0
        public void Update()
        {
            vline.size.Y = EngineCore.HundredToLength(100);
            vline.pos.X  = EngineCore.GetCurrentCursorPos().X;
            hline.size.X = EngineCore.HundredToLength(100);
            hline.pos.Y  = EngineCore.GetCurrentCursorPos().Y;

            if (EngineCore.currentMouseState.LeftButton == ButtonState.Pressed && EngineCore.oldMouseState.LeftButton == ButtonState.Released)
            {
                choose.pos = EngineCore.GetCurrentCursorPos();
            }
            if (EngineCore.currentMouseState.LeftButton == ButtonState.Pressed)
            {
                choose.size += EngineCore.GetCurrentCursorPos() - EngineCore.GetOldCursorPos();
            }
            else
            {
                choose.size = Vector2.Zero;
            }
            text = ("Cursor: {" + EngineCore.GetCurrentCursorPos().X + ", " + EngineCore.GetCurrentCursorPos().Y + "}\n" + otherInfo +
                    ((choose.size.Length() > 1) ? ("Size: {" + choose.size.X.ToString() + ", " + choose.size.Y.ToString() + "}\n") : ""));
        }
Esempio n. 2
0
 public bool UnderMouseBefore()
 {
     return(UnderMouse(EngineCore.GetOldCursorPos()));
 }