public ARKOverlay() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; this.ShowInTaskbar = false; this.TopMost = true; labels[0] = lblLevel; labels[1] = lblHealth; labels[2] = lblStamina; labels[3] = lblOxygen; labels[4] = lblFood; labels[5] = lblWeight; labels[6] = lblMeleeDamage; labels[7] = lblMovementSpeed; labels[8] = lblExtraText; labels[9] = txtBreedingProgress; this.Location = Point.Empty;// this.PointToScreen(ArkOCR.OCR.statPositions["NameAndLevel"]); this.Size = new Size(2000, 2000); inventoryCheckTimer.Interval = 1000; inventoryCheckTimer.Tick += inventoryCheckTimer_Tick; theOverlay = this; }
private bool toggleInventoryCheck; // check inventory only every other time public ARKOverlay() { InitializeComponent(); FormBorderStyle = FormBorderStyle.None; ShowInTaskbar = false; TopMost = true; infoShownAt = DateTime.Now.AddMinutes(-10); labels[0] = lblHealth; labels[1] = lblStamina; labels[2] = lblOxygen; labels[3] = lblFood; labels[4] = lblWeight; labels[5] = lblMeleeDamage; labels[6] = lblMovementSpeed; labels[7] = lblLevel; labels[8] = lblExtraText; labels[9] = lblBreedingProgress; foreach (Label l in labels) { l.Text = string.Empty; } lblStatus.Text = string.Empty; labelTimer.Text = string.Empty; labelInfo.Text = string.Empty; Size = new Size(ArkOCR.OCR.ocrConfig.resolutionWidth, ArkOCR.OCR.ocrConfig.resolutionHeight); timerUpdateTimer = new Timer { Interval = 1000 }; timerUpdateTimer.Tick += TimerUpdateTimer_Tick; theOverlay = this; currentlyInInventory = false; if (!ArkOCR.OCR.setResolution()) { MessageBox.Show("No calibration-info for this resolution found.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } labelInfo.Location = new Point(ArkOCR.OCR.ocrConfig.resolutionWidth - (labelInfo.Width + 30), 40); notes = string.Empty; InfoDuration = 10; }
private bool toggleInventoryCheck; // check inventory only every other time public ARKOverlay() { InitializeComponent(); FormBorderStyle = FormBorderStyle.None; ShowInTaskbar = false; TopMost = true; infoShownAt = DateTime.Now.AddMinutes(-10); labels[0] = lblHealth; labels[1] = lblStamina; labels[2] = lblOxygen; labels[3] = lblFood; labels[4] = lblWeight; labels[5] = lblMeleeDamage; labels[6] = lblMovementSpeed; labels[7] = lblLevel; foreach (Label l in labels) { l.Text = string.Empty; } lblStatus.Text = string.Empty; labelTimer.Text = string.Empty; labelInfo.Text = string.Empty; Size = ArkOCR.OCR.GetScreenshotOfProcess()?.Size ?? default; if (Size == default) { Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); } timerUpdateTimer = new Timer { Interval = 1000 }; timerUpdateTimer.Tick += TimerUpdateTimer_Tick; theOverlay = this; currentlyInInventory = false; ocrPossible = ArkOCR.OCR.setResolution(); SetInfoPositions(); notes = string.Empty; InfoDuration = 10; Location = new Point(0, 0); }
private bool toggleInventoryCheck; // check inventory only every other time public ARKOverlay() { InitializeComponent(); FormBorderStyle = FormBorderStyle.None; ShowInTaskbar = false; TopMost = true; infoShownAt = DateTime.Now.AddMinutes(-10); labels[0] = lblHealth; labels[1] = lblStamina; labels[2] = lblOxygen; labels[3] = lblFood; labels[4] = lblWeight; labels[5] = lblMeleeDamage; labels[6] = lblMovementSpeed; labels[7] = lblLevel; foreach (Label l in labels) { l.Text = string.Empty; } lblStatus.Text = string.Empty; labelTimer.Text = string.Empty; labelInfo.Text = string.Empty; Size = ArkOCR.OCR.GetScreenshotOfProcess()?.Size ?? default; timerUpdateTimer = new Timer { Interval = 1000 }; timerUpdateTimer.Tick += TimerUpdateTimer_Tick; theOverlay = this; currentlyInInventory = false; ocrPossible = ArkOCR.OCR.setResolution(); //if (!ocrPossible) // MessageBox.Show("No calibration-info for this resolution found.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); labelInfo.Location = new Point((Size.Width == 0 ? 800 : Size.Width) - (labelInfo.Width + 30), 40); notes = string.Empty; InfoDuration = 10; }
public ARKOverlay() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; this.ShowInTaskbar = false; this.TopMost = true; infoShownAt = DateTime.Now.AddMinutes(-10); labels[0] = lblLevel; labels[1] = lblHealth; labels[2] = lblStamina; labels[3] = lblOxygen; labels[4] = lblFood; labels[5] = lblWeight; labels[6] = lblMeleeDamage; labels[7] = lblMovementSpeed; labels[8] = lblExtraText; labels[9] = lblBreedingProgress; foreach (Label l in labels) { l.Text = ""; } lblStatus.Text = "Overlay"; labelTimer.Text = ""; this.Location = Point.Empty; this.Size = new Size(2000, 2000); inventoryCheckTimer.Interval = 1500; inventoryCheckTimer.Tick += inventoryCheckTimer_Tick; theOverlay = this; if (ArkOCR.OCR.currentResolutionW == 0 && !ArkOCR.OCR.setResolution()) { MessageBox.Show("Couldn't calibrate for the current resolution, sorry.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } labelInfo.Location = new Point(ArkOCR.OCR.currentResolutionW - (labelInfo.Width + 30), 40);; InfoDuration = 10; }
private bool _toggleInventoryCheck; // check inventory only every other time public ARKOverlay() { InitializeComponent(); FormBorderStyle = FormBorderStyle.None; ShowInTaskbar = false; TopMost = true; parentInheritance1.ForeColor = Color.FromArgb(1, 1, 1); // so it's not transparent (black == TransparencyKey) Win32API.SetHitTestVisibility(this.Handle, false); _infoShownAt = DateTime.Now.AddMinutes(-10); _labels = new[] { lblHealth, lblStamina, lblOxygen, lblFood, lblWeight, lblMeleeDamage, lblMovementSpeed, lblLevel }; foreach (Label l in _labels) { l.Text = string.Empty; } lblStatus.Text = string.Empty; labelTimer.Text = string.Empty; labelInfo.Text = string.Empty; Size = ArkOcr.Ocr.GetScreenshotOfProcess()?.Size ?? default; if (Size == default) { Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); } _timerUpdateTimer = new Timer { Interval = 1000 }; _timerUpdateTimer.Tick += TimerUpdateTimer_Tick; theOverlay = this; _currentlyInInventory = false; _ocrPossible = ArkOcr.Ocr.ocrConfig != null && ArkOcr.Ocr.CheckResolutionSupportedByOcr(); SetInfoPositions(); _notes = string.Empty; SetInheritanceCreatures(); SetLocatlizations(); InfoDuration = 10; Location = new Point(0, 0); }
private void checkBoxToggleOverlay_CheckedChanged(object sender, EventArgs e) { if (overlay == null) { overlay = new ARKOverlay(); overlay.ExtractorForm = this; /* Process[] p = Process.GetProcessesByName("ShooterGame"); if (p.Length > 0) overlay.ARKProcess = p[0]; */ } overlay.Visible = checkBoxToggleOverlay.Checked; overlay.inventoryCheckTimer.Enabled = overlay.Visible; ArkOCR.OCR.calibrate(null); }