public bool IsInFixedDeadzone(Vector2 screenCoord, double aspectRatio) { const double minnimapWidthPx = 330.0; const double minimapHeightPx = 280.0; const double definingHeight = 1080.0; const double minimapHeight = (minimapHeightPx / definingHeight) * 2; var minimapWidth = (minnimapWidthPx / definingHeight) / aspectRatio * 2; var safe = UIMenu.GetSafezoneBounds(); var safeHeight = (safe.Y / definingHeight) * 2; var safeWidth = (safe.X / definingHeight) / aspectRatio * 2; var tmpZone = new Deadzone(-1f, 1f - (float)minimapHeight, (float)(minimapWidth + safeWidth), (float)(minimapHeight + safeHeight)); var tmpZones = new List <Deadzone>(_settings.Deadzones) { tmpZone }; return(tmpZones.Any(z => z.Contains(screenCoord))); }
public bool IsInFixedDeadzone(Vector2 screenCoord, double aspectRatio) { const double minnimapWidthPx = 330.0; const double minimapHeightPx = 280.0; const double definingHeight = 1080.0; const double minimapHeight = (minimapHeightPx / definingHeight) * 2; var minimapWidth = (minnimapWidthPx / definingHeight) / aspectRatio * 2; var safe = UIMenu.GetSafezoneBounds(); var safeHeight = (safe.Y / definingHeight)*2; var safeWidth = (safe.X/definingHeight)/aspectRatio*2; var tmpZone = new Deadzone(-1f, 1f - (float)minimapHeight, (float)(minimapWidth + safeWidth), (float)(minimapHeight + safeHeight)); var tmpZones = new List<Deadzone>(_settings.Deadzones) {tmpZone}; return tmpZones.Any(z => z.Contains(screenCoord)); }