Update AgreementWindow to be resizeable/have more word wrapping

rendering v2.13
Liza 2023-02-11 14:07:38 +01:00
parent f7d707073b
commit 3cd75ff9a5
2 changed files with 16 additions and 8 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
<LangVersion>11.0</LangVersion> <LangVersion>11.0</LangVersion>
<Version>2.12</Version> <Version>2.13</Version>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@ -13,11 +13,17 @@ namespace Pal.Client.Windows
public AgreementWindow() : base($"{Localization.Palace_Pal}###PalPalaceAgreement") public AgreementWindow() : base($"{Localization.Palace_Pal}###PalPalaceAgreement")
{ {
Flags = ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse; Flags = ImGuiWindowFlags.NoCollapse;
Size = new Vector2(500, 500); Size = new Vector2(500, 500);
SizeCondition = ImGuiCond.Always; SizeCondition = ImGuiCond.FirstUseEver;
PositionCondition = ImGuiCond.Always; PositionCondition = ImGuiCond.FirstUseEver;
Position = new Vector2(310, 310); Position = new Vector2(310, 310);
SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(500, 500),
MaximumSize = new Vector2(2000, 2000),
};
} }
public override void OnOpen() public override void OnOpen()
@ -42,9 +48,11 @@ namespace Pal.Client.Windows
ImGui.Separator(); ImGui.Separator();
ImGui.TextColored(ImGuiColors.DalamudRed, Localization.Agreement_Warning1); ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
ImGui.TextColored(ImGuiColors.DalamudRed, Localization.Agreement_Warning2); ImGui.TextWrapped(Localization.Agreement_Warning1);
ImGui.TextColored(ImGuiColors.DalamudRed, Localization.Agreement_Warning3); ImGui.TextWrapped(Localization.Agreement_Warning2);
ImGui.TextWrapped(Localization.Agreement_Warning3);
ImGui.PopStyleColor();
ImGui.Separator(); ImGui.Separator();
@ -64,7 +72,7 @@ namespace Pal.Client.Windows
ImGui.Separator(); ImGui.Separator();
if (ImGui.Button(Localization.Agreement_ViewPluginAndServerSourceCode)) if (ImGui.Button(Localization.Agreement_ViewPluginAndServerSourceCode))
GenericHelpers.ShellStart("https://github.com/LizaCarvbelli/PalPalace"); GenericHelpers.ShellStart("https://github.com/carvelli/PalPalace");
} }
} }
} }