public AppForm() { SuspendLayout(); contextMenu1 = new ContextMenu(); var menuItem1 = new MenuItem(); var menuItem2 = new MenuItem(); contextMenu1.MenuItems.AddRange(new[] { menuItem1, menuItem2 }); menuItem2.Index = 0; menuItem2.Text = "Bring to Front"; menuItem1.Index = 1; menuItem1.Text = "E&xit"; notifyIcon = new NotifyIcon(); notifyIcon.ContextMenu = contextMenu1; notifyIcon.Icon = Icon; menuItem1.Click += (sender, args) => { Close(); }; menuItem2.Click += (sender, args) => { BringToFront(); ImGui.CaptureMouseFromApp(); ImGui.CaptureKeyboardFromApp(); }; Icon = Icon.ExtractAssociatedIcon("textures\\poehud.ico"); notifyIcon.Icon = Icon; StartPosition = FormStartPosition.Manual; Location = new Point(0, 0); Text = "ExileApi"; notifyIcon.Text = "ExileApi"; notifyIcon.Visible = true; Size = new Size(1600, 900); //Screen.PrimaryScreen.Bounds.Size; FormBorderStyle = FormBorderStyle.None; TopMost = true; ShowInTaskbar = true; BackColor = Color.Black; ResumeLayout(false); BringToFront(); }
private void DrawUi(GameTime gameTime) { _imguiRenderer.BeforeLayout(gameTime); // Draw viewport overlays if (!string.IsNullOrEmpty(hoveredentityId)) { DrawSpriteBounds(hoveredentityId, Color.CornflowerBlue.PackedValue); } else if (!string.IsNullOrEmpty(selectedEntityId)) { DrawSpriteBounds(selectedEntityId, Color.GreenYellow.PackedValue); } ImGui.Begin("timeline"); ImGuiEx.DrawUiTimeline(_state.Animator); ImGui.End(); var hierarchyWindowWidth = 256; ImGui.SetNextWindowPos(new NVector2(GraphicsDevice.Viewport.Width - hierarchyWindowWidth, 0), ImGuiCond.FirstUseEver); ImGui.SetNextWindowSize(NVector2.UnitX * hierarchyWindowWidth + NVector2.UnitY * GraphicsDevice.Viewport.Height, ImGuiCond.FirstUseEver); ImGui.Begin("Management"); { DrawUiActions(); DrawUiHierarchyFrame(); DrawUiProperties(); } ImGui.End(); _imguiRenderer.AfterLayout(); if (ImGui.IsWindowHovered(ImGuiHoveredFlags.AnyWindow)) { ImGui.CaptureKeyboardFromApp(); ImGui.CaptureMouseFromApp(); } }