36 lines
1.4 KiB
C#
36 lines
1.4 KiB
C#
using System;
|
|
using System.Numerics;
|
|
using Dalamud.Bindings.ImGui;
|
|
using Dalamud.Interface;
|
|
using Dalamud.Interface.Components;
|
|
using Dalamud.Interface.Utility.Raii;
|
|
|
|
namespace Questionable.Windows.ChangelogComponents;
|
|
|
|
internal sealed class ChangelogFooterComponent
|
|
{
|
|
public static void Draw(Action onConfirm)
|
|
{
|
|
ImDrawListPtr windowDrawList = ImGui.GetWindowDrawList();
|
|
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
|
|
float x = ImGui.GetContentRegionAvail().X;
|
|
windowDrawList.AddRectFilledMultiColor(cursorScreenPos, cursorScreenPos + new Vector2(x, 2f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.75f, 0.55f, 0.95f, 0.4f)), ImGui.ColorConvertFloat4ToU32(new Vector4(0.75f, 0.55f, 0.95f, 1f)), ImGui.ColorConvertFloat4ToU32(new Vector4(0.75f, 0.55f, 0.95f, 1f)), ImGui.ColorConvertFloat4ToU32(new Vector4(0.75f, 0.55f, 0.95f, 0.4f)));
|
|
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 8f);
|
|
float num = 120f;
|
|
float num2 = (ImGui.GetContentRegionAvail().X - num) * 0.5f;
|
|
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + num2);
|
|
using (ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.55f, 0.45f, 0.75f, 0.6f)))
|
|
{
|
|
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.8f)))
|
|
{
|
|
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.75f, 0.55f, 0.95f, 1f)))
|
|
{
|
|
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.CheckCircle, "Got It!"))
|
|
{
|
|
onConfirm();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|