2022-10-23 02:38:58 +00:00
|
|
|
|
using Dalamud.Interface.Colors;
|
|
|
|
|
using Dalamud.Interface.Windowing;
|
|
|
|
|
using ECommons;
|
|
|
|
|
using ImGuiNET;
|
|
|
|
|
using System.Numerics;
|
2023-02-10 19:48:14 +00:00
|
|
|
|
using Pal.Client.Properties;
|
2022-10-23 02:38:58 +00:00
|
|
|
|
|
2022-10-26 18:43:24 +00:00
|
|
|
|
namespace Pal.Client.Windows
|
2022-10-23 02:38:58 +00:00
|
|
|
|
{
|
|
|
|
|
internal class AgreementWindow : Window
|
|
|
|
|
{
|
|
|
|
|
private int _choice;
|
|
|
|
|
|
2023-02-10 19:48:14 +00:00
|
|
|
|
public AgreementWindow() : base($"{Localization.Palace_Pal}###PalPalaceAgreement")
|
2022-10-23 02:38:58 +00:00
|
|
|
|
{
|
|
|
|
|
Flags = ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse;
|
|
|
|
|
Size = new Vector2(500, 500);
|
|
|
|
|
SizeCondition = ImGuiCond.Always;
|
|
|
|
|
PositionCondition = ImGuiCond.Always;
|
|
|
|
|
Position = new Vector2(310, 310);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnOpen()
|
|
|
|
|
{
|
|
|
|
|
_choice = -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Draw()
|
|
|
|
|
{
|
|
|
|
|
var config = Service.Configuration;
|
|
|
|
|
|
2023-02-10 19:48:14 +00:00
|
|
|
|
ImGui.TextWrapped(Localization.Explanation_1);
|
|
|
|
|
ImGui.TextWrapped(Localization.Explanation_2);
|
2022-10-23 02:38:58 +00:00
|
|
|
|
|
|
|
|
|
ImGui.Spacing();
|
|
|
|
|
|
2023-02-10 19:48:14 +00:00
|
|
|
|
ImGui.TextWrapped(Localization.Explanation_3);
|
|
|
|
|
ImGui.TextWrapped(Localization.Explanation_4);
|
2022-10-26 18:43:24 +00:00
|
|
|
|
|
2023-02-10 19:48:14 +00:00
|
|
|
|
ImGui.RadioButton(Localization.Config_UploadMyDiscoveries_ShowOtherTraps, ref _choice, (int)Configuration.EMode.Online);
|
|
|
|
|
ImGui.RadioButton(Localization.Config_NeverUploadDiscoveries_ShowMyTraps, ref _choice, (int)Configuration.EMode.Offline);
|
2022-10-26 18:43:24 +00:00
|
|
|
|
|
2022-10-23 02:38:58 +00:00
|
|
|
|
ImGui.Separator();
|
|
|
|
|
|
2023-02-10 19:48:14 +00:00
|
|
|
|
ImGui.TextColored(ImGuiColors.DalamudRed, Localization.Agreement_Warning1);
|
|
|
|
|
ImGui.TextColored(ImGuiColors.DalamudRed, Localization.Agreement_Warning2);
|
|
|
|
|
ImGui.TextColored(ImGuiColors.DalamudRed, Localization.Agreement_Warning3);
|
2022-10-23 02:38:58 +00:00
|
|
|
|
|
|
|
|
|
ImGui.Separator();
|
|
|
|
|
|
|
|
|
|
if (_choice == -1)
|
2023-02-10 19:48:14 +00:00
|
|
|
|
ImGui.TextDisabled(Localization.Agreement_PickOneOption);
|
2022-10-23 02:38:58 +00:00
|
|
|
|
ImGui.BeginDisabled(_choice == -1);
|
2023-02-10 19:48:14 +00:00
|
|
|
|
if (ImGui.Button(Localization.Agreement_UsingThisOnMyOwnRisk))
|
2022-10-23 02:38:58 +00:00
|
|
|
|
{
|
|
|
|
|
config.Mode = (Configuration.EMode)_choice;
|
|
|
|
|
config.FirstUse = false;
|
|
|
|
|
config.Save();
|
|
|
|
|
|
|
|
|
|
IsOpen = false;
|
|
|
|
|
}
|
|
|
|
|
ImGui.EndDisabled();
|
|
|
|
|
|
|
|
|
|
ImGui.Separator();
|
|
|
|
|
|
2023-02-10 19:48:14 +00:00
|
|
|
|
if (ImGui.Button(Localization.Agreement_ViewPluginAndServerSourceCode))
|
2022-10-23 02:38:58 +00:00
|
|
|
|
GenericHelpers.ShellStart("https://github.com/LizaCarvbelli/PalPalace");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|