public ControlCommon() { Enabled = true; Width = 1; Height = 1; Mouse = new Mouse(); }
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; }
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(); }
protected void SetMouse(Mouse newMouse, TCODMouseData mouse) { newMouse.X = mouse.CellX; newMouse.Y = mouse.CellY; newMouse.LeftButton = mouse.LeftButton; }
public override void OnMouseMove(Mouse mouse) { if (LayoutData.IsMouseInControl(mouse)) { var mouseInControl = LayoutData.GetMouseInControl(mouse); Control.OnMouseMove(mouseInControl); } }
public virtual void OnMouseMove(Mouse mouse) { if (MouseMoveEvent != null) { MouseMoveEvent(mouse); } Mouse.SetMouse(mouse); }
public virtual void OnMouseButton(Mouse mouse) { if (MouseButtonEvent != null) { MouseButtonEvent(mouse); } }