internal static void UpdateTracker(Graphics g) { int i, start_index = pickups_to_show.Length / 2 - (1 - pickups_to_show.Length % 2); String IGT = ""; Size windowSize = ImportsMgr.GetWindowSize(dolphin_window); Size iconsRectSize = CalculateIconsRect(windowSize.Width, windowSize.Height); int imgSize = Math.Min((int)((iconsRectSize.Width - 10) / pickups_to_show.Length), 52); int x = (windowSize.Width / 2) - start_index * (imgSize + 5); int y = (windowSize.Height - iconsRectSize.Height) / 2 + 5; Font IGT_Font = new Font("Arial", (int)(15.7894735f * (4.0f / 3.0f))); Font Icon_Font = new Font("Arial", (int)(18.0f * ((float)imgSize / 52.0f))); int h = CalculateIconYOffset(imgSize, Icon_Font.Height, iconsRectSize.Height); if (MetroidPrime.IsIngame()) { if (igt_display_type != IGTDisplayType.None) { IGT = MetroidPrime.IGTAsStr(igt_display_type); DrawIGT(g, IGT_Font, windowSize.Width / 2 - (int)g.MeasureString(IGT, IGT_Font).Width / 2, y + imgSize + (int)IGT_Font.Size, IGT); } if (!MetroidPrime.IsSwitchingState()) { for (i = 0; i < pickups_to_show.Length; i++) { DrawUpgradeIcon(g, Icon_Font, pickups_to_show[i], x + (int)(((float)i - 1.5f) * (imgSize + 5)), y + h, imgSize); } } } g.Save(); g.Flush(); }
internal static void UpdateTrackerInfo(Form form) { if (!MetroidPrime.IsIngame()) { return; } FormUtils.SetWindowPosition(new Point(0, 0)); FormUtils.SetWindowSize(ImportsMgr.GetWindowSize(dolphin_window)); form.Invoke(new Action(() => { if (Keyboard.IsKeyDown(Dolphin.refresh_config_key)) { Dolphin.LoadConfig(); } })); }