mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Add prizes
This commit is contained in:
parent
46c0a86375
commit
c67ed345b7
1 changed files with 13 additions and 3 deletions
|
|
@ -144,7 +144,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
private string[] aprilFoolsLines =
|
private string[] aprilFoolsLines =
|
||||||
[
|
[
|
||||||
"We sincerely apologize for this year's April Fool's joke.\nWe hope you enjoyed it, and we promise to do better next year.",
|
"We sincerely apologize for this year's April Fool's joke.\nWe hope you enjoyed it, and we promise to do better next year.",
|
||||||
"Congratulations! You are Dalamud's 1,000,000th user!\nClick here to claim your prize!",
|
"Congratulations! You are Dalamud's 1,000,000th user!\nClick here to claim your prize, a set of 4 high quality wallpapers!",
|
||||||
"Please do not feed the ducks.\nThey are not ducks.",
|
"Please do not feed the ducks.\nThey are not ducks.",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -1561,13 +1561,17 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
ImGui.PopStyleColor();
|
ImGui.PopStyleColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawLinesCentered(string text)
|
bool DrawLinesCentered(string text)
|
||||||
{
|
{
|
||||||
|
var clicked = false;
|
||||||
var lines = text.Split('\n');
|
var lines = text.Split('\n');
|
||||||
foreach (var line in lines)
|
foreach (var line in lines)
|
||||||
{
|
{
|
||||||
ImGuiHelpers.CenteredText(line);
|
ImGuiHelpers.CenteredText(line);
|
||||||
|
clicked |= ImGui.IsItemClicked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return clicked;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pm = Service<PluginManager>.Get();
|
var pm = Service<PluginManager>.Get();
|
||||||
|
|
@ -1583,7 +1587,13 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
{
|
{
|
||||||
ImGuiHelpers.ScaledDummy(10);
|
ImGuiHelpers.ScaledDummy(10);
|
||||||
this.aprilFoolsLineIdx ??= new Random().Next(0, this.aprilFoolsLines.Length);
|
this.aprilFoolsLineIdx ??= new Random().Next(0, this.aprilFoolsLines.Length);
|
||||||
DrawLinesCentered(this.aprilFoolsLines[this.aprilFoolsLineIdx.Value]);
|
|
||||||
|
var clicked = DrawLinesCentered(this.aprilFoolsLines[this.aprilFoolsLineIdx.Value]);
|
||||||
|
if (clicked && this.aprilFoolsLineIdx == 1)
|
||||||
|
{
|
||||||
|
Util.OpenLink("https://goatcorp.github.io/high_quality_wallpapers.zip");
|
||||||
|
}
|
||||||
|
|
||||||
ImGuiHelpers.ScaledDummy(10);
|
ImGuiHelpers.ScaledDummy(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue