public override void Render(RenderingContext rc) { if (!this.poe.InGame || !Settings.GetBool("MinimapIcons")) { return; } this.playerPos = this.poe.Player.GetComponent <Positioned>().GridPos; Poe_UIElement smallMinimap = this.poe.Internal.IngameState.IngameUi.Minimap.SmallMinimap; float scale = 240f; Rect clientRect = smallMinimap.GetClientRect(); Vec2 minimapCenter = new Vec2(clientRect.X + clientRect.W / 2, clientRect.Y + clientRect.H / 2); double diag = Math.Sqrt((double)(clientRect.W * clientRect.W + clientRect.H * clientRect.H)) / 2.0; List <MinimapIcon>[] array = this.icons; for (int i = 0; i < array.Length; i++) { List <MinimapIcon> list = array[i]; list.RemoveAll((MinimapIcon x) => !x.Validate()); foreach (MinimapIcon current in from x in list where x.WantsToRender() select x) { Vec2 point = this.WorldToMinimap(current.WorldPosition, minimapCenter, diag, scale); current.RenderAt(rc, point); } } }
public override void Render(RenderingContext rc) { if (!Settings.GetBool("Tooltip") || !Settings.GetBool("Tooltip.ShowItemLevel")) { return; } Poe_UIElement uIHover = this.poe.Internal.IngameState.UIHover; Poe_Entity item = uIHover.AsObject <Poe_UI_InventoryItemIcon>().Item; if (item.address != 0 && item.IsValid) { Poe_UI_Tooltip tooltip = uIHover.AsObject <Poe_UI_InventoryItemIcon>().Tooltip; if (tooltip == null) { return; } Poe_UIElement childAtIndex = tooltip.GetChildAtIndex(0); if (childAtIndex == null) { return; } Poe_UIElement childAtIndex2 = childAtIndex.GetChildAtIndex(1); if (childAtIndex2 == null) { return; } Rect clientRect = childAtIndex2.GetClientRect(); rc.AddTextWithHeight(new Vec2(clientRect.X + 2, clientRect.Y + 2), item.GetComponent <Mods>().ItemLevel.ToString(), Color.White, 16, DrawTextFormat.Left); } }