|
|
@ -7,6 +7,7 @@ |
|
|
|
class Program |
|
|
|
class Program |
|
|
|
{ |
|
|
|
{ |
|
|
|
private static bool isRunning = true; |
|
|
|
private static bool isRunning = true; |
|
|
|
|
|
|
|
private static bool showImGuiDemo = false; |
|
|
|
private static int Fps = 144; |
|
|
|
private static int Fps = 144; |
|
|
|
private static int[] resizeHelper = new int[4] { 0, 0, 2560, 1440 }; |
|
|
|
private static int[] resizeHelper = new int[4] { 0, 0, 2560, 1440 }; |
|
|
|
private static int seconds = 5; |
|
|
|
private static int seconds = 5; |
|
|
@ -32,12 +33,13 @@ |
|
|
|
|
|
|
|
|
|
|
|
private static void RenderUi(object sender, System.EventArgs e) |
|
|
|
private static void RenderUi(object sender, System.EventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (isRunning) |
|
|
|
if (showImGuiDemo) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ImGui.ShowDemoWindow(ref isRunning); |
|
|
|
ImGui.ShowDemoWindow(ref showImGuiDemo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ImGui.Begin("SDL2Window Config", ImGuiWindowFlags.NoResize | ImGuiWindowFlags.AlwaysAutoResize); |
|
|
|
if(ImGui.Begin("Overlay Config", ref isRunning, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.AlwaysAutoResize)) |
|
|
|
|
|
|
|
{ |
|
|
|
ImGui.Text($"Current FPS: {Fps}"); |
|
|
|
ImGui.Text($"Current FPS: {Fps}"); |
|
|
|
if (ImGui.SliderInt("Set FPS", ref Fps, 30, 144)) |
|
|
|
if (ImGui.SliderInt("Set FPS", ref Fps, 30, 144)) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -61,7 +63,14 @@ |
|
|
|
overlay.Hide(); |
|
|
|
overlay.Hide(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ImGui.NewLine(); |
|
|
|
|
|
|
|
if(ImGui.Button("Show ImGui Demo")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
showImGuiDemo = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ImGui.End(); |
|
|
|
ImGui.End(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |