private void OnItemInteract(MapClickEvent e) { var mods = ServerInput.ToServerModifiers(e.Modifiers); if (e.Gob != null) { SendMessage("itemact", e.ScreenCoord, e.MapCoord, mods, e.Gob.Id, e.Gob.Position); } else { SendMessage("itemact", e.ScreenCoord, e.MapCoord, mods); } }
private void OnMapClick(MapClickEvent e) { var button = ServerInput.ToServerButton(e.Button); var mods = ServerInput.ToServerModifiers(e.Modifiers); if (e.Gob != null) { SendMessage("click", e.ScreenCoord, e.MapCoord, button, mods, e.Gob.Id, e.Gob.Position); } else { SendMessage("click", e.ScreenCoord, e.MapCoord, button, mods); } }
private void OnMapClick(object sender, EventArgs e) { var args = (MouseEventArgs)e; if (args.Button != MouseButtons.Left) { return; } var latLon = gMapControl1.FromLocalToLatLng(args.X, args.Y); MapClickEvent?.Invoke( this, new MapClickEventArgs { Lattitude = latLon.Lat, Longitude = latLon.Lng }); }