using System; using System.Numerics; using ClickableTransparentOverlay; using ImGuiNET; namespace imgui { internal class Renderer : Overlay { public bool deneme = false; public bool deneme2 = false; public float sliderValue = 0.5f; public Vector3 color = new Vector3(0.4f, 0.7f, 0.0f); public float rgbSpeed = 0.05f; private float buttonFade = 0.0f; private string textInput = "Default text"; private int comboIndex = 0; private string[] comboItems = { "Item 1", "Item 2", "Item 3" }; private float progress = 0.0f; private Random rand = new Random(); public Makro leftClickMacro; public Makro rightClickMacro; public Renderer() { leftClickMacro = new Makro(() => MouseClickSimulator.LeftClick()) { ActivationKey = ConsoleKey.K, CPS = 14 }; rightClickMacro = new Makro(() => MouseClickSimulator.RightClick()) { ActivationKey = ConsoleKey.L, CPS = 14 }; } protected override void Render() { // ImGui stili ayarları SetImGuiStyle(); ImGui.SetNextWindowSize(new Vector2(600, 400), ImGuiCond.FirstUseEver); ImGui.Begin("Modern UI", ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.MenuBar | ImGuiWindowFlags.NoCollapse); if (ImGui.BeginMenuBar()) { if (ImGui.BeginMenu("File")) { ImGui.MenuItem("Open", "Ctrl+O"); ImGui.MenuItem("Save", "Ctrl+S"); ImGui.EndMenu(); } if (ImGui.BeginMenu("Edit")) { ImGui.MenuItem("Undo", "Ctrl+Z"); ImGui.MenuItem("Redo", "Ctrl+Y"); ImGui.EndMenu(); } ImGui.EndMenuBar(); } // RGB renk geçişi AnimateRGB(ref color); if (ImGui.BeginTabBar("Tabs")) { if (ImGui.BeginTabItem("Main")) { ImGui.Text("Hello, World!"); ImGui.Checkbox("Option 1", ref deneme); ImGui.Checkbox("Option 2", ref deneme2); ImGui.SliderFloat("Slider", ref sliderValue, 0.0f, 1.0f); ImGui.ColorEdit3("Color", ref color); ImGui.InputText("Text Input", ref textInput, 100); ImGui.Combo("Combo Box", ref comboIndex, comboItems, comboItems.Length); ImGui.ProgressBar(progress, new Vector2(-1, 0), "Progress"); progress += 0.001f; if (progress > 1.0f) progress = 0.0f; // Hover efektiyle button fade animasyonu if (ImGui.IsItemHovered()) { buttonFade += 0.02f; if (buttonFade > 1.0f) buttonFade = 1.0f; } else { buttonFade -= 0.02f; if (buttonFade < 0.0f) buttonFade = 0.0f; } ImGui.PushStyleColor(ImGuiCol.Button, new Vector4(0.2f + buttonFade, 0.3f + buttonFade, 0.4f + buttonFade, 1.0f)); if (ImGui.Button("Fade Button")) { // Button click event } ImGui.PopStyleColor(); // Left Click Macro bool isLeftMacroActive = leftClickMacro.IsActive; if (ImGui.Checkbox("Left Click Macro", ref isLeftMacroActive)) { leftClickMacro.IsActive = isLeftMacroActive; if (leftClickMacro.IsActive) { leftClickMacro.Start(); } else { leftClickMacro.Stop(); } } int leftCPS = leftClickMacro.CPS; if (ImGui.SliderInt("Left Click CPS", ref leftCPS, 1, 20)) { leftClickMacro.CPS = leftCPS; } // Right Click Macro bool isRightMacroActive = rightClickMacro.IsActive; if (ImGui.Checkbox("Right Click Macro", ref isRightMacroActive)) { rightClickMacro.IsActive = isRightMacroActive; if (rightClickMacro.IsActive) { rightClickMacro.Start(); } else { rightClickMacro.Stop(); } } int rightCPS = rightClickMacro.CPS; if (ImGui.SliderInt("Right Click CPS", ref rightCPS, 1, 20)) { rightClickMacro.CPS = rightCPS; } ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Graph")) { // Example graph data int values_count = 90; float[] values = new float[values_count]; for (int i = 0; i < values_count; i++) values[i] = (float)Math.Sin(i * 0.1f); ImGui.PlotLines("Line Graph", ref values[0], values_count); ImGui.PlotHistogram("Histogram", ref values[0], values_count); ImGui.EndTabItem(); } ImGui.EndTabBar(); } ImGui.End(); } private void SetImGuiStyle() { var style = ImGui.GetStyle(); style.WindowRounding = 5.3f; style.FrameRounding = 2.3f; style.ScrollbarRounding = 0; style.FramePadding = new Vector2(4, 2); style.ItemSpacing = new Vector2(8, 2); style.ItemInnerSpacing = new Vector2(4, 4); style.IndentSpacing = 20; style.ScrollbarSize = 16; style.GrabMinSize = 8; style.WindowTitleAlign = new Vector2(0.5f, 0.5f); style.ButtonTextAlign = new Vector2(0.5f, 0.5f); var colors = style.Colors; colors[(int)ImGuiCol.Text] = new Vector4(0.90f, 0.90f, 0.90f, 1.00f); colors[(int)ImGuiCol.TextDisabled] = new Vector4(0.60f, 0.60f, 0.60f, 1.00f); colors[(int)ImGuiCol.WindowBg] = new Vector4(0.12f, 0.12f, 0.12f, 0.94f); colors[(int)ImGuiCol.ChildBg] = new Vector4(0.00f, 0.00f, 0.00f, 0.00f); colors[(int)ImGuiCol.PopupBg] = new Vector4(0.08f, 0.08f, 0.08f, 0.94f); colors[(int)ImGuiCol.Border] = new Vector4(0.43f, 0.43f, 0.50f, 0.50f); colors[(int)ImGuiCol.BorderShadow] = new Vector4(0.00f, 0.00f, 0.00f, 0.00f); colors[(int)ImGuiCol.FrameBg] = new Vector4(0.20f, 0.21f, 0.22f, 0.54f); colors[(int)ImGuiCol.FrameBgHovered] = new Vector4(0.40f, 0.40f, 0.40f, 0.40f); colors[(int)ImGuiCol.FrameBgActive] = new Vector4(0.18f, 0.18f, 0.18f, 0.67f); colors[(int)ImGuiCol.TitleBg] = new Vector4(0.09f, 0.09f, 0.09f, 1.00f); colors[(int)ImGuiCol.TitleBgActive] = new Vector4(0.12f, 0.12f, 0.12f, 1.00f); colors[(int)ImGuiCol.TitleBgCollapsed] = new Vector4(0.10f, 0.10f, 0.10f, 0.51f); colors[(int)ImGuiCol.MenuBarBg] = new Vector4(0.14f, 0.14f, 0.14f, 1.00f); colors[(int)ImGuiCol.ScrollbarBg] = new Vector4(0.02f, 0.02f, 0.02f, 0.39f); colors[(int)ImGuiCol.ScrollbarGrab] = new Vector4(0.20f, 0.20f, 0.20f, 1.00f); colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Vector4(0.27f, 0.27f, 0.27f, 1.00f); colors[(int)ImGuiCol.ScrollbarGrabActive] = new Vector4(0.30f, 0.30f, 0.30f, 1.00f); colors[(int)ImGuiCol.CheckMark] = new Vector4(0.90f, 0.90f, 0.90f, 1.00f); colors[(int)ImGuiCol.SliderGrab] = new Vector4(0.28f, 0.28f, 0.28f, 1.00f); colors[(int)ImGuiCol.SliderGrabActive] = new Vector4(0.37f, 0.37f, 0.37f, 1.00f); colors[(int)ImGuiCol.Button] = new Vector4(0.20f, 0.20f, 0.20f, 1.00f); colors[(int)ImGuiCol.ButtonHovered] = new Vector4(0.25f, 0.25f, 0.25f, 1.00f); colors[(int)ImGuiCol.ButtonActive] = new Vector4(0.30f, 0.30f, 0.30f, 1.00f); colors[(int)ImGuiCol.Header] = new Vector4(0.20f, 0.20f, 0.20f, 0.31f); colors[(int)ImGuiCol.HeaderHovered] = new Vector4(0.26f, 0.26f, 0.26f, 0.80f); colors[(int)ImGuiCol.HeaderActive] = new Vector4(0.29f, 0.29f, 0.29f, 1.00f); colors[(int)ImGuiCol.Separator] = new Vector4(0.43f, 0.43f, 0.50f, 0.50f); colors[(int)ImGuiCol.SeparatorHovered] = new Vector4(0.54f, 0.54f, 0.54f, 0.78f); colors[(int)ImGuiCol.SeparatorActive] = new Vector4(0.54f, 0.54f, 0.54f, 1.00f); colors[(int)ImGuiCol.ResizeGrip] = new Vector4(0.26f, 0.59f, 0.98f, 0.25f); colors[(int)ImGuiCol.ResizeGripHovered] = new Vector4(0.26f, 0.59f, 0.98f, 0.67f); colors[(int)ImGuiCol.ResizeGripActive] = new Vector4(0.26f, 0.59f, 0.98f, 0.95f); colors[(int)ImGuiCol.Tab] = new Vector4(0.18f, 0.35f, 0.58f, 0.86f); colors[(int)ImGuiCol.TabHovered] = new Vector4(0.26f, 0.59f, 0.98f, 0.80f); colors[(int)ImGuiCol.TabActive] = new Vector4(0.20f, 0.41f, 0.68f, 1.00f); colors[(int)ImGuiCol.TabUnfocused] = new Vector4(0.07f, 0.10f, 0.15f, 0.97f); colors[(int)ImGuiCol.TabUnfocusedActive] = new Vector4(0.14f, 0.26f, 0.42f, 1.00f); colors[(int)ImGuiCol.PlotLines] = new Vector4(0.61f, 0.61f, 0.61f, 1.00f); colors[(int)ImGuiCol.PlotLinesHovered] = new Vector4(1.00f, 0.43f, 0.35f, 1.00f); colors[(int)ImGuiCol.PlotHistogram] = new Vector4(0.90f, 0.70f, 0.00f, 1.00f); colors[(int)ImGuiCol.PlotHistogramHovered] = new Vector4(1.00f, 0.60f, 0.00f, 1.00f); colors[(int)ImGuiCol.TextSelectedBg] = new Vector4(0.26f, 0.59f, 0.98f, 0.35f); colors[(int)ImGuiCol.DragDropTarget] = new Vector4(1.00f, 1.00f, 0.00f, 0.90f); colors[(int)ImGuiCol.NavHighlight] = new Vector4(0.26f, 0.59f, 0.98f, 1.00f); colors[(int)ImGuiCol.NavWindowingHighlight] = new Vector4(1.00f, 1.00f, 1.00f, 0.70f); colors[(int)ImGuiCol.NavWindowingDimBg] = new Vector4(0.80f, 0.80f, 0.80f, 0.20f); colors[(int)ImGuiCol.ModalWindowDimBg] = new Vector4(0.80f, 0.80f, 0.80f, 0.35f); } private void AnimateRGB(ref Vector3 color) { float increment = rgbSpeed * 0.01f; color.X += increment; if (color.X > 1.0f) color.X = 0.0f; color.Y += increment; if (color.Y > 1.0f) color.Y = 0.0f; color.Z += increment; if (color.Z > 1.0f) color.Z = 0.0f; } } }