diff --git a/Dalamud/Fools/FoolsManager.cs b/Dalamud/Fools/FoolsManager.cs index 761dd0c08..a6ed3726f 100644 --- a/Dalamud/Fools/FoolsManager.cs +++ b/Dalamud/Fools/FoolsManager.cs @@ -144,6 +144,15 @@ internal class FoolsManager : IDisposable, IServiceType RealAuthor = "Berna", Type = typeof(YesHealMePlugin), }, + new() + { + Name = "Complicated Tweaks", + InternalName = "ComplicatedTweaksPlugin", + Description = "As complicated as it gets!", + Author = "Caraxi", + RealAuthor = "NotNite", + Type = typeof(ComplicatedTweaksPlugin), + }, }; } diff --git a/Dalamud/Fools/Plugins/ComplicatedTweaksPlugin.cs b/Dalamud/Fools/Plugins/ComplicatedTweaksPlugin.cs new file mode 100644 index 000000000..6e9e19aae --- /dev/null +++ b/Dalamud/Fools/Plugins/ComplicatedTweaksPlugin.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ImGuiNET; + +namespace Dalamud.Fools.Plugins; + +public class ComplicatedTweaksPlugin : IFoolsPlugin +{ + enum Widget + { + Button, + Checkbox, + DragFloat, + InputFloat, + } + + private List widgets; + + public ComplicatedTweaksPlugin() + { + this.widgets = new List(); + + var random = new Random(); + var possibleWidgets = Enum.GetValues(typeof(Widget)).Cast().ToList(); + + for (var i = 0; i < 100; i++) + { + var widget = possibleWidgets[random.Next(possibleWidgets.Count)]; + this.widgets.Add(widget); + } + } + + public void DrawUi() + { + if (ImGui.Begin("Complicated Tweaks")) + { + foreach (var widget in this.widgets) + { + switch (widget) + { + case Widget.Button: + ImGui.Button("Click me!"); + break; + + case Widget.Checkbox: + var iHateImgui = false; + ImGui.Checkbox(string.Empty, ref iHateImgui); + break; + + case Widget.DragFloat: + var dragFloat = 0f; + ImGui.DragFloat(string.Empty, ref dragFloat); + break; + + case Widget.InputFloat: + var inputFloat = 0f; + ImGui.InputFloat(string.Empty, ref inputFloat); + break; + } + } + } + + ImGui.End(); + } + + public void Dispose() { } +}