Update Artifact part labels support i18n

Update cn window title to GrasscutterTools
This commit is contained in:
2022-05-15 18:45:32 +08:00
parent 265b23f475
commit 01dc1b6f1c
6 changed files with 1361 additions and 2400 deletions

View File

@@ -360,6 +360,8 @@ namespace GrasscutterTools
private Dictionary<string, List<KeyValuePair<int, string>>> subAttrs;
private string[] ArtifactPartLabels;
private void InitArtifactList()
{
CmbArtifactSet.Items.Clear();
@@ -383,6 +385,8 @@ namespace GrasscutterTools
}
CmbSubAttribution.Items.Clear();
CmbSubAttribution.Items.AddRange(subAttrs.Keys.ToArray());
ArtifactPartLabels = Resources.ArtifactPartLabels.Split(',');
}
private void CmbSubAttribution_SelectedIndexChanged(object sender, EventArgs e)
@@ -428,8 +432,6 @@ namespace GrasscutterTools
ArtifactInputChanged(sender, e);
}
private readonly string[] ArtifactPartLabels = new string[] { "空之杯", "死之羽", "理之冠", "生之花", "时之沙" };
private void CmbArtifactPart_SelectedIndexChanged(object sender, EventArgs e)
{
if (CmbArtifactPart.SelectedIndex < 0)
@@ -439,8 +441,11 @@ namespace GrasscutterTools
}
var name = CmbArtifactPart.SelectedItem as string;
var id = GameData.Artifacts.Ids[Array.IndexOf(GameData.Artifacts.Names, name)];
LblArtifactName.Text = ArtifactPartLabels[id / 10 % 10 - 1];
var pardIndex = id / 10 % 10 - 1;
if (pardIndex < ArtifactPartLabels?.Length)
LblArtifactName.Text = ArtifactPartLabels[pardIndex];
else
LblArtifactName.Text = "";
ArtifactInputChanged(sender, e);
}