chore: purge april fools 2022 code

This commit is contained in:
goaaats 2022-04-03 03:02:31 +02:00
parent b2107c6887
commit 76b2129a93
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
6 changed files with 0 additions and 561 deletions

View file

@ -53,7 +53,6 @@ namespace Dalamud.Interface.Internal
private readonly SelfTestWindow selfTestWindow;
private readonly StyleEditorWindow styleEditorWindow;
private readonly TitleScreenMenuWindow titleScreenMenuWindow;
private readonly FoolsAskWindow faWindow;
private readonly TextureWrap logoTexture;
private readonly TextureWrap tsmLogoTexture;
@ -92,7 +91,6 @@ namespace Dalamud.Interface.Internal
this.selfTestWindow = new SelfTestWindow() { IsOpen = false };
this.styleEditorWindow = new StyleEditorWindow() { IsOpen = false };
this.titleScreenMenuWindow = new TitleScreenMenuWindow() { IsOpen = false };
this.faWindow = new FoolsAskWindow() { IsOpen = false };
this.WindowSystem.AddWindow(this.changelogWindow);
this.WindowSystem.AddWindow(this.colorDemoWindow);
@ -108,7 +106,6 @@ namespace Dalamud.Interface.Internal
this.WindowSystem.AddWindow(this.selfTestWindow);
this.WindowSystem.AddWindow(this.styleEditorWindow);
this.WindowSystem.AddWindow(this.titleScreenMenuWindow);
this.WindowSystem.AddWindow(this.faWindow);
ImGuiManagedAsserts.AssertsEnabled = configuration.AssertsEnabledAtStartup;
@ -250,8 +247,6 @@ namespace Dalamud.Interface.Internal
/// </summary>
public void OpenStyleEditor() => this.styleEditorWindow.IsOpen = true;
public void OpenFaWindow() => this.faWindow.IsOpen = true;
#endregion
#region Close

View file

@ -1,100 +0,0 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Numerics;
using Dalamud.Configuration.Internal;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Windowing;
using Dalamud.Utility;
using ImGuiNET;
using ImGuiScene;
namespace Dalamud.Interface.Internal.Windows
{
/// <summary>
/// For major updates, an in-game Changelog window.
/// </summary>
internal sealed class FoolsAskWindow : Window, IDisposable
{
private readonly string assemblyVersion = Util.AssemblyVersion;
private readonly TextureWrap logoTexture;
/// <summary>
/// Initializes a new instance of the <see cref="FoolsAskWindow"/> class.
/// </summary>
public FoolsAskWindow()
: base("New in Dalamud!", ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse)
{
this.Namespace = "DalamudChangelogWindow";
var interfaceManager = Service<InterfaceManager>.Get();
var dalamud = Service<Dalamud>.Get();
this.logoTexture =
interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "logo.png"))!;
}
/// <inheritdoc/>
public override void Draw()
{
this.Size = new Vector2(885, 250);
this.SizeCondition = ImGuiCond.Always;
this.Flags = ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse;
ImGui.TextWrapped("Today, we are proud to announce \"Dalamud: Prepare To Die Edition\".\nIt's a new initiative intended to improve your immersion when playing FFXIV, featuring all new and unintrusive visual and sound effects.\nIt's only available today, so join while you can.");
ImGuiHelpers.ScaledDummy(10);
ImGui.TextWrapped("You can choose to opt-in here - thank you for your support!");
ImGui.SameLine();
ImGuiHelpers.ScaledDummy(0);
var imgCursor = ImGui.GetCursorPos();
ImGuiHelpers.ScaledDummy(40);
ImGuiHelpers.ScaledDummy(240);
ImGui.SameLine();
var btnSize = new Vector2(140, 40);
var config = Service<DalamudConfiguration>.Get();
if (ImGui.Button("No, don't ask again", btnSize))
{
config.AskedFools22 = true;
config.Fools22Newer = false;
config.Save();
this.IsOpen = false;
}
ImGui.SameLine();
if (ImGui.Button("Yes!", btnSize))
{
config.AskedFools22 = true;
config.Fools22Newer = true;
config.Save();
this.IsOpen = false;
}
imgCursor.X += 750;
imgCursor.Y -= 30;
ImGui.SetCursorPos(imgCursor);
ImGui.Image(this.logoTexture.ImGuiHandle, new Vector2(100));
}
/// <summary>
/// Dispose this window.
/// </summary>
public void Dispose()
{
this.logoTexture.Dispose();
}
}
}

View file

@ -50,8 +50,6 @@ namespace Dalamud.Interface.Internal.Windows
private bool doFocus;
private bool doTsm;
private bool doFools22;
private List<string>? dtrOrder;
private List<string>? dtrIgnore;
private int dtrSpacing;
@ -176,8 +174,6 @@ namespace Dalamud.Interface.Internal.Windows
var configuration = Service<DalamudConfiguration>.Get();
this.dtrOrder = configuration.DtrOrder;
this.dtrIgnore = configuration.DtrIgnore;
this.doFools22 = configuration.Fools22Newer;
}
/// <inheritdoc/>
@ -244,12 +240,6 @@ namespace Dalamud.Interface.Internal.Windows
private void DrawGeneralTab()
{
if (DateTime.Now.Month == 4 && DateTime.Now.Day == 1)
{
ImGui.Checkbox(Loc.Localize("Fools22", "Enable April Fools 2022"), ref this.doFools22);
ImGui.TextColored(ImGuiColors.DalamudGrey, Loc.Localize("Fools22Hint", "Enables the April Fools 2022 funny joke. Turn this off if you don't think it's funny."));
}
ImGui.Text(Loc.Localize("DalamudSettingsLanguage", "Language"));
ImGui.Combo("##XlLangCombo", ref this.langIndex, this.locLanguages, this.locLanguages.Length);
ImGui.TextColored(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingsLanguageHint", "Select the language Dalamud will be displayed in."));
@ -870,8 +860,6 @@ namespace Dalamud.Interface.Internal.Windows
configuration.IsFocusManagementEnabled = this.doFocus;
configuration.ShowTsm = this.doTsm;
configuration.Fools22Newer = this.doFools22;
configuration.UseAxisFontsFromGame = this.doUseAxisFontsFromGame;
configuration.AllowBigFontAtlas = this.doAllowBigFontAtlas;
configuration.FontGamma = this.fontGamma;