Ejemplo n.º 1
0
        public ControlCommon()
        {
            Enabled = true;

            Width = 1;
            Height = 1;

            Mouse = new Mouse();
        }
Ejemplo n.º 2
0
 public void SetMouse(Mouse newMouse)
 {
     X = newMouse.X;
     Y = newMouse.Y;
     LeftButton = newMouse.LeftButton;
     MiddleButton = newMouse.MiddleButton;
     RightButton = newMouse.RightButton;
     PixelX = newMouse.PixelX;
     PixelY = newMouse.PixelY;
 }
Ejemplo n.º 3
0
        public LibtcodShell(string title, int width, int height)
            : base(title, width, height)
        {
            //Mouse = new Mouse();
            OldMouse = new Mouse();

            TCODConsole.initRoot(Width, Height, Title, false, TCODRendererType.SDL);
            TCODConsole.root.setBackgroundColor(TCODColor.black);
            TCODConsole.root.setForegroundColor(TCODColor.white);
            TCODConsole.root.setKeyColor(TCODColor.red);
            TCODConsole.root.clear();
            TCODSystem.setFps(24);

            Screen = new LibtcodScreen(Width, Height, TCODConsole.root);

            TCODConsole.flush();
        }
Ejemplo n.º 4
0
 protected void SetMouse(Mouse newMouse, TCODMouseData mouse)
 {
     newMouse.X = mouse.CellX;
     newMouse.Y = mouse.CellY;
     newMouse.LeftButton = mouse.LeftButton;
 }
Ejemplo n.º 5
0
 public override void OnMouseMove(Mouse mouse)
 {
     if (LayoutData.IsMouseInControl(mouse))
     {
         var mouseInControl = LayoutData.GetMouseInControl(mouse);
         Control.OnMouseMove(mouseInControl);
     }
 }
Ejemplo n.º 6
0
        public virtual void OnMouseMove(Mouse mouse)
        {
            if (MouseMoveEvent != null)
            {
                MouseMoveEvent(mouse);
            }

            Mouse.SetMouse(mouse);
        }
Ejemplo n.º 7
0
 public virtual void OnMouseButton(Mouse mouse)
 {
     if (MouseButtonEvent != null)
     {
         MouseButtonEvent(mouse);
     }
 }