Consolidate DLC Raid Buttons (#4112)

Given that the raid button is used for both games, consolidate the buttons for DLC raids.
This commit is contained in:
Jonathan Herbert 2023-12-19 00:24:09 -04:00 committed by GitHub
parent 5ad7a31171
commit 53bbebae6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 71 deletions

View File

@ -85,9 +85,8 @@ private void InitializeComponent()
B_MailBox = new System.Windows.Forms.Button();
B_OpenApricorn = new System.Windows.Forms.Button();
B_Raids = new System.Windows.Forms.Button();
B_RaidArmor = new System.Windows.Forms.Button();
B_RaidCrown = new System.Windows.Forms.Button();
B_RaidKitakami = new System.Windows.Forms.Button();
B_RaidDLC1 = new System.Windows.Forms.Button();
B_RaidDLC2 = new System.Windows.Forms.Button();
B_Blocks = new System.Windows.Forms.Button();
B_OtherSlots = new System.Windows.Forms.Button();
B_OpenSealStickers = new System.Windows.Forms.Button();
@ -108,7 +107,6 @@ private void InitializeComponent()
TB_Secure1 = new System.Windows.Forms.TextBox();
L_GameSync = new System.Windows.Forms.Label();
TB_GameSync = new System.Windows.Forms.TextBox();
B_RaidBlueberry = new System.Windows.Forms.Button();
tabBoxMulti.SuspendLayout();
Tab_Box.SuspendLayout();
Tab_PartyBattle.SuspendLayout();
@ -397,10 +395,8 @@ private void InitializeComponent()
FLP_SAVtools.Controls.Add(B_MailBox);
FLP_SAVtools.Controls.Add(B_OpenApricorn);
FLP_SAVtools.Controls.Add(B_Raids);
FLP_SAVtools.Controls.Add(B_RaidArmor);
FLP_SAVtools.Controls.Add(B_RaidCrown);
FLP_SAVtools.Controls.Add(B_RaidKitakami);
FLP_SAVtools.Controls.Add(B_RaidBlueberry);
FLP_SAVtools.Controls.Add(B_RaidDLC1);
FLP_SAVtools.Controls.Add(B_RaidDLC2);
FLP_SAVtools.Controls.Add(B_Blocks);
FLP_SAVtools.Controls.Add(B_OtherSlots);
FLP_SAVtools.Controls.Add(B_OpenSealStickers);
@ -693,7 +689,7 @@ private void InitializeComponent()
//
// B_OpenChatterEditor
//
B_OpenChatterEditor.Location = new System.Drawing.Point(212, 204);
B_OpenChatterEditor.Location = new System.Drawing.Point(108, 244);
B_OpenChatterEditor.Margin = new System.Windows.Forms.Padding(4);
B_OpenChatterEditor.Name = "B_OpenChatterEditor";
B_OpenChatterEditor.Size = new System.Drawing.Size(96, 32);
@ -704,7 +700,7 @@ private void InitializeComponent()
//
// B_Roamer
//
B_Roamer.Location = new System.Drawing.Point(108, 244);
B_Roamer.Location = new System.Drawing.Point(212, 244);
B_Roamer.Margin = new System.Windows.Forms.Padding(4);
B_Roamer.Name = "B_Roamer";
B_Roamer.Size = new System.Drawing.Size(96, 32);
@ -715,7 +711,7 @@ private void InitializeComponent()
//
// B_FestivalPlaza
//
B_FestivalPlaza.Location = new System.Drawing.Point(212, 244);
B_FestivalPlaza.Location = new System.Drawing.Point(316, 244);
B_FestivalPlaza.Margin = new System.Windows.Forms.Padding(4);
B_FestivalPlaza.Name = "B_FestivalPlaza";
B_FestivalPlaza.Size = new System.Drawing.Size(96, 32);
@ -726,7 +722,7 @@ private void InitializeComponent()
//
// B_MailBox
//
B_MailBox.Location = new System.Drawing.Point(316, 244);
B_MailBox.Location = new System.Drawing.Point(4, 284);
B_MailBox.Margin = new System.Windows.Forms.Padding(4);
B_MailBox.Name = "B_MailBox";
B_MailBox.Size = new System.Drawing.Size(96, 32);
@ -737,7 +733,7 @@ private void InitializeComponent()
//
// B_OpenApricorn
//
B_OpenApricorn.Location = new System.Drawing.Point(4, 284);
B_OpenApricorn.Location = new System.Drawing.Point(108, 284);
B_OpenApricorn.Margin = new System.Windows.Forms.Padding(4);
B_OpenApricorn.Name = "B_OpenApricorn";
B_OpenApricorn.Size = new System.Drawing.Size(96, 32);
@ -748,7 +744,7 @@ private void InitializeComponent()
//
// B_Raids
//
B_Raids.Location = new System.Drawing.Point(108, 284);
B_Raids.Location = new System.Drawing.Point(212, 284);
B_Raids.Margin = new System.Windows.Forms.Padding(4);
B_Raids.Name = "B_Raids";
B_Raids.Size = new System.Drawing.Size(96, 32);
@ -757,42 +753,31 @@ private void InitializeComponent()
B_Raids.UseVisualStyleBackColor = true;
B_Raids.Click += B_OpenRaids_Click;
//
// B_RaidArmor
// B_RaidDLC1
//
B_RaidArmor.Location = new System.Drawing.Point(212, 284);
B_RaidArmor.Margin = new System.Windows.Forms.Padding(4);
B_RaidArmor.Name = "B_RaidArmor";
B_RaidArmor.Size = new System.Drawing.Size(96, 32);
B_RaidArmor.TabIndex = 2;
B_RaidArmor.Text = "Raids (DLC 1)";
B_RaidArmor.UseVisualStyleBackColor = true;
B_RaidArmor.Click += B_OpenRaids_Click;
B_RaidDLC1.Location = new System.Drawing.Point(316, 284);
B_RaidDLC1.Margin = new System.Windows.Forms.Padding(4);
B_RaidDLC1.Name = "B_RaidDLC1";
B_RaidDLC1.Size = new System.Drawing.Size(96, 32);
B_RaidDLC1.TabIndex = 2;
B_RaidDLC1.Text = "Raids (DLC 1)";
B_RaidDLC1.UseVisualStyleBackColor = true;
B_RaidDLC1.Click += B_OpenRaids_Click;
//
// B_RaidCrown
// B_RaidDLC2
//
B_RaidCrown.Location = new System.Drawing.Point(316, 284);
B_RaidCrown.Margin = new System.Windows.Forms.Padding(4);
B_RaidCrown.Name = "B_RaidCrown";
B_RaidCrown.Size = new System.Drawing.Size(96, 32);
B_RaidCrown.TabIndex = 4;
B_RaidCrown.Text = "Raids (DLC 2)";
B_RaidCrown.UseVisualStyleBackColor = true;
B_RaidCrown.Click += B_OpenRaids_Click;
//
// B_RaidKitakami
//
B_RaidKitakami.Location = new System.Drawing.Point(4, 324);
B_RaidKitakami.Margin = new System.Windows.Forms.Padding(4);
B_RaidKitakami.Name = "B_RaidKitakami";
B_RaidKitakami.Size = new System.Drawing.Size(96, 32);
B_RaidKitakami.TabIndex = 4;
B_RaidKitakami.Text = "Raids (DLC 1)";
B_RaidKitakami.UseVisualStyleBackColor = true;
B_RaidKitakami.Click += B_OpenRaids_Click;
B_RaidDLC2.Location = new System.Drawing.Point(4, 324);
B_RaidDLC2.Margin = new System.Windows.Forms.Padding(4);
B_RaidDLC2.Name = "B_RaidDLC2";
B_RaidDLC2.Size = new System.Drawing.Size(96, 32);
B_RaidDLC2.TabIndex = 4;
B_RaidDLC2.Text = "Raids (DLC 2)";
B_RaidDLC2.UseVisualStyleBackColor = true;
B_RaidDLC2.Click += B_OpenRaids_Click;
//
// B_Blocks
//
B_Blocks.Location = new System.Drawing.Point(212, 324);
B_Blocks.Location = new System.Drawing.Point(108, 324);
B_Blocks.Margin = new System.Windows.Forms.Padding(4);
B_Blocks.Name = "B_Blocks";
B_Blocks.Size = new System.Drawing.Size(96, 32);
@ -803,7 +788,7 @@ private void InitializeComponent()
//
// B_OtherSlots
//
B_OtherSlots.Location = new System.Drawing.Point(316, 324);
B_OtherSlots.Location = new System.Drawing.Point(212, 324);
B_OtherSlots.Margin = new System.Windows.Forms.Padding(4);
B_OtherSlots.Name = "B_OtherSlots";
B_OtherSlots.Size = new System.Drawing.Size(96, 32);
@ -814,7 +799,7 @@ private void InitializeComponent()
//
// B_OpenSealStickers
//
B_OpenSealStickers.Location = new System.Drawing.Point(4, 364);
B_OpenSealStickers.Location = new System.Drawing.Point(316, 324);
B_OpenSealStickers.Margin = new System.Windows.Forms.Padding(4);
B_OpenSealStickers.Name = "B_OpenSealStickers";
B_OpenSealStickers.Size = new System.Drawing.Size(96, 32);
@ -825,7 +810,7 @@ private void InitializeComponent()
//
// B_Poffins
//
B_Poffins.Location = new System.Drawing.Point(108, 364);
B_Poffins.Location = new System.Drawing.Point(4, 364);
B_Poffins.Margin = new System.Windows.Forms.Padding(4);
B_Poffins.Name = "B_Poffins";
B_Poffins.Size = new System.Drawing.Size(96, 32);
@ -836,7 +821,7 @@ private void InitializeComponent()
//
// B_RaidsSevenStar
//
B_RaidsSevenStar.Location = new System.Drawing.Point(212, 364);
B_RaidsSevenStar.Location = new System.Drawing.Point(108, 364);
B_RaidsSevenStar.Margin = new System.Windows.Forms.Padding(4);
B_RaidsSevenStar.Name = "B_RaidsSevenStar";
B_RaidsSevenStar.Size = new System.Drawing.Size(96, 32);
@ -1011,17 +996,6 @@ private void InitializeComponent()
TB_GameSync.TabIndex = 10;
TB_GameSync.Validated += UpdateStringSeed;
//
// B_RaidBlueberry
//
B_RaidBlueberry.Location = new System.Drawing.Point(108, 324);
B_RaidBlueberry.Margin = new System.Windows.Forms.Padding(4);
B_RaidBlueberry.Name = "B_RaidBlueberry";
B_RaidBlueberry.Size = new System.Drawing.Size(96, 32);
B_RaidBlueberry.TabIndex = 8;
B_RaidBlueberry.Text = "Raids (DLC 2)";
B_RaidBlueberry.UseVisualStyleBackColor = true;
B_RaidBlueberry.Click += B_OpenRaids_Click;
//
// SAVEditor
//
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@ -1112,10 +1086,9 @@ private void InitializeComponent()
private PartyEditor SL_Party;
private System.Windows.Forms.Button B_Raids;
private System.Windows.Forms.Button B_Blocks;
private System.Windows.Forms.Button B_RaidArmor;
private System.Windows.Forms.Button B_RaidDLC1;
private System.Windows.Forms.Button B_OtherSlots;
private System.Windows.Forms.Button B_RaidCrown;
private System.Windows.Forms.Button B_RaidKitakami;
private System.Windows.Forms.Button B_RaidDLC2;
private System.Windows.Forms.Button Menu_ExportBAK;
private System.Windows.Forms.FlowLayoutPanel FLP_SAVToolsMisc;
private System.Windows.Forms.Button B_OpenSealStickers;
@ -1123,6 +1096,5 @@ private void InitializeComponent()
private System.Windows.Forms.Button B_VerifySaveEntities;
private System.Windows.Forms.Button B_RaidsSevenStar;
private System.Windows.Forms.Button B_ConvertKorean;
private System.Windows.Forms.Button B_RaidBlueberry;
}
}

View File

@ -567,9 +567,9 @@ private void B_OpenRaids_Click(object sender, EventArgs e)
{
if (sender == B_Raids)
OpenDialog(new SAV_Raid9(sv, sv.RaidPaldea));
else if (sender == B_RaidKitakami)
else if (sender == B_RaidDLC1)
OpenDialog(new SAV_Raid9(sv, sv.RaidKitakami));
else if (sender == B_RaidBlueberry)
else if (sender == B_RaidDLC2)
OpenDialog(new SAV_Raid9(sv, sv.RaidBlueberry));
else if (sender == B_RaidsSevenStar)
OpenDialog(new SAV_RaidSevenStar9(sv, sv.RaidSevenStar));
@ -578,9 +578,9 @@ private void B_OpenRaids_Click(object sender, EventArgs e)
{
if (sender == B_Raids)
OpenDialog(new SAV_Raid8(swsh, swsh.Raid));
else if (sender == B_RaidArmor)
else if (sender == B_RaidDLC1)
OpenDialog(new SAV_Raid8(swsh, swsh.RaidArmor));
else
else if(sender == B_RaidDLC2)
OpenDialog(new SAV_Raid8(swsh, swsh.RaidCrown));
}
}
@ -1168,10 +1168,8 @@ private void ToggleViewSubEditors(SaveFile sav)
B_Raids.Visible = sav is SAV8SWSH or SAV9SV;
B_RaidsSevenStar.Visible = sav is SAV9SV;
B_RaidArmor.Visible = sav is SAV8SWSH { SaveRevision: >= 1 };
B_RaidCrown.Visible = sav is SAV8SWSH { SaveRevision: >= 2 };
B_RaidKitakami.Visible = sav is SAV9SV { SaveRevision: >= 1 };
B_RaidBlueberry.Visible = sav is SAV9SV { SaveRevision: >= 2 };
B_RaidDLC1.Visible = sav is SAV8SWSH { SaveRevision: >= 1 } or SAV9SV { SaveRevision: >= 1 };
B_RaidDLC2.Visible = sav is SAV8SWSH { SaveRevision: >= 2 } or SAV9SV { SaveRevision: >= 2 };
FLP_SAVtools.Visible = B_Blocks.Visible = true;
var list = FLP_SAVtools.Controls.OfType<Control>().OrderBy(z => z.Text).ToArray();