Misc Fixes

- Don't enable flags unless SaveGeneration is N3DS.
- Update villager name on selector button when DLC villager is imported in e+.
- Disable the wiki button when the villager is a DLC villager or unknown.
- Move villager selector selected name text a bit to accomodate larger names.
This commit is contained in:
Cuyler36 2020-08-25 20:39:24 -04:00
parent fd5d1c23c3
commit 2cf5299d5a
4 changed files with 8 additions and 5 deletions

View file

@ -423,7 +423,7 @@ private void ImportDlcVillager()
_villager.Data.Personality = decompressedData[0xD];
// Update controls to reflect changes
_nameBox.Text = _villager.Name;
_nameBox.Text = _villagerSelectionButton.Text = _villager.Name;
_catchphraseBox.Text = _villager.Data.Catchphrase;
_personalityBox.SelectedIndex = _villager.Data.Personality;

View file

@ -36,7 +36,8 @@ public void RestoreFromVillager(SimpleVillager villager)
? new Point(64 * 6, 64 * 23)
: new Point(64 * ((villager.VillagerId & 0xFF) % 10),
64 * ((villager.VillagerId & 0xFF) / 10));
nameLabel.Text = villager.Name;
nameLabel.Text = villager.Name;
wikiButton.Enabled = villager.Name != "Unknown" && !villager.Name.Contains("DLC Villager");
Villager = villager;
}

View file

@ -94,7 +94,7 @@ private void InitializeComponent()
//
this._label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this._label1.AutoSize = true;
this._label1.Location = new System.Drawing.Point(487, 420);
this._label1.Location = new System.Drawing.Point(408, 420);
this._label1.Name = "_label1";
this._label1.Size = new System.Drawing.Size(52, 13);
this._label1.TabIndex = 5;
@ -105,7 +105,7 @@ private void InitializeComponent()
this.selectionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.selectionLabel.AutoSize = true;
this.selectionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.selectionLabel.Location = new System.Drawing.Point(545, 418);
this.selectionLabel.Location = new System.Drawing.Point(466, 418);
this.selectionLabel.Name = "selectionLabel";
this.selectionLabel.Size = new System.Drawing.Size(49, 15);
this.selectionLabel.TabIndex = 6;

View file

@ -501,7 +501,9 @@ public void SetCurrentItem(Item newItem, bool buried = false)
var oldSelectedItemId = selectedItem.SelectedValue;
Item.SelectedItem = new Item(newItem); // Clone the item.
selectedItem.Enabled = itemFlag1.Enabled = itemFlag2.Enabled = itemIdTextBox.Enabled = true;
if (Save.SaveInstance.SaveGeneration == SaveGeneration.N3DS)
itemFlag1.Enabled = itemFlag2.Enabled = true;
selectedItem.Enabled = itemIdTextBox.Enabled = true;
selectedItem.SelectedValue = newItem.ItemId;
itemFlag1.Text = newItem.Flag1.ToString("X2");